Skip to content
ScienceQuest
Electricity Simulator School

Charged Particle in a Magnetic Field Simulator

A charged particle in a uniform magnetic field moves in a circle of radius r = mv/qB, or a helix. See both, plus a velocity selector and mass spectrometer.

Simulator

With the scene focused, the up and down arrow keys change B and left and right the speed. Space plays and pauses.

Radius r
r = mv/(qB). Classical. Relativity makes the true radius 0.00056 percent larger at this speed.
10.4 cm
Period T
T = 2πm/(qB): the same at every speed.
656 ns
Cyclotron frequency
Turns per second, qB/(2πm).
1.52 MHz
Magnetic force qvB
Always at right angles to the velocity, so it changes the direction and never the speed.
1.6 × 10⁻¹⁴ N
Kinetic energy
½mv², which the field never changes.
5.22 keV
Turns
Seen with B pointing into the page. The sign of the charge sets the direction.
Anticlockwise

A proton moving at 1000 km/s across a 100 mT field into the page goes round a circle of radius 10.4 cm, anticlockwise, once every 656 ns.

Parameters

CODATA 2022 masses. The positron has the electron’s mass and the opposite charge.

km/s

1000 km/s is 1.0 × 10⁶ m/s. The top of the range is a tenth of the speed of light.

mT

1000 mT is 1 T, and 1 gauss is 0.1 mT.

  • Radius
The radius grows in proportion to the speed, a straight line through zero, for a proton in 100 mT. The period does not change along it.

Citing this tool

Last updated . Add the date you accessed it as well, which a citation of a page that can change asks for. If a specific result matters, cite the permalink from the tool’s share row instead of this page: it reproduces the exact parameters.

Teaching with this? You can put it on a class page or LMS for free, with no ads inside the frame. Get the embed code.

The equation

F=qvBsin⁡θ,r=mvqB,T=2πmqB,v=EBF = qvB\sin\theta, \quad r = \frac{mv}{qB}, \quad T = \frac{2\pi m}{qB}, \quad v = \frac{E}{B}

Heaviside (1889) and Lorentz (1895), the force on a moving charge

How a charged particle moves in a magnetic field

A charged particle moving across a uniform magnetic field goes round a circle of radius r = mv/(qB), because the magnetic force F = qvB sin θ always acts at right angles to its velocity. If the velocity makes an angle with the field, the particle spirals along the field on a helix instead, and if it moves along the field it is not deflected at all. The time for one turn, T = 2πm/(qB), is the same at every speed. This simulator draws each path exactly, from the solution of the Lorentz force law, and adds a velocity selector, where crossed electric and magnetic fields let only the speed v = E/B through undeflected, and a mass spectrometer that separates isotopes by the radius of their paths.

The magnetic force never has a part along the velocity, so it does no work: the particle’s speed and kinetic energy stay exactly the same while its direction turns. That is the whole reason the path closes into a circle, with the magnetic force supplying the centripetal force, qvB = mv²/r. The Centripetal Force Calculator works out the same force for any circular motion.

How to use the simulator

Choose a set-up, then the particle, its speed and the field. The scene is drawn to scale, and the scale bar in its corner says what a length on screen is. For the circle, the helix and the spectrometer the scale changes only in steps of 1, 2 and 5, so a stronger field visibly shrinks the path. At the opening settings a proton turns in well under a microsecond, so the picture is slowed by the factor printed in the other corner. With the scene focused, the arrow keys change the field and the speed.

  • Circle. The magnetic field points into the page, drawn as crosses, and the particle starts moving to the right. A positive charge turns anticlockwise and a negative one clockwise: the electron and the positron have the same mass and trace mirror-image circles of the same size in opposite directions. The plot is the radius against the speed, a straight line.
  • Helix. The field runs to the right and the velocity makes the angle you set with it. The part of the velocity across the field, v sin θ, sets the radius; the part along it, v cos θ, carries the particle a pitch p = v cos θ × T along the field in every turn. The far half of each turn is dashed.
  • Velocity selector. Two plates make an electric field pointing down, the upper plate positive, across the magnetic field. The electric force qE and the magnetic force qvB are drawn on the particle as arrows; they cancel only at v = E/B. The plates are drawn one r₀ long, where r₀ is the radius the selected speed would have in the magnetic field alone, 0.2 r₀ apart, with an exit slit 0.04 r₀ wide, so the picture is the same for every particle. Plates this short have a limit, as every selector does: a particle 24 or more times faster than E/B crosses them too quickly to be turned far aside and reaches the slit too, on a path that still curves.
  • Mass spectrometer. Singly charged ions of two isotopes are accelerated through the voltage you set, enter the field, which points out of the page, through a slit, and land on a detector after half a circle. The taller peak is the more abundant isotope.

Worked example: a proton in a 0.10 T field

What is the radius of the path of a proton moving at 1.0 × 10⁶ m/s at right angles to a 0.10 T field, and how long does one turn take? These are the simulator’s opening settings, with the proton’s mass m = 1.673 × 10⁻²⁷ kg and charge q = 1.602 × 10⁻¹⁹ C.

  • Radius: r = mv/(qB) = (1.673 × 10⁻²⁷ × 1.0 × 10⁶) ÷ (1.602 × 10⁻¹⁹ × 0.10) = 0.104 m, or 10.4 cm.
  • Period: T = 2πm/(qB) = 6.56 × 10⁻⁷ s, or 0.656 µs, so the proton goes round 1.52 million times a second, the cyclotron frequency of 1.52 MHz.
  • The force on it is qvB = 1.60 × 10⁻¹⁴ N, and its kinetic energy is 5.22 keV throughout.
  • At twice the speed, 2.0 × 10⁶ m/s, the radius doubles to 20.9 cm and the period is still 0.656 µs: the circle is twice as long and the proton covers it twice as fast.

NCERT’s Class 12 physics textbook, in its chapter on moving charges and magnetism, works Example 4.3 for an electron at 3 × 10⁷ m/s in a field of 6 × 10⁻⁴ T, with m = 9 × 10⁻³¹ kg and e = 1.6 × 10⁻¹⁹ C, and gets r = 28 cm, a frequency of 17 MHz and an energy of 2.5 keV. Set the particle to Electron, the speed to 30000 km/s and the field to 0.6 mT: the exact constants give 28.4 cm, 16.8 MHz and 2.56 keV.

Worked example: the helix at 60°

If the same proton moves at 60° to the field, what are the radius and pitch of its helix? The speed across the field is 1.0 × 10⁶ × sin 60° = 8.66 × 10⁵ m/s and along it 1.0 × 10⁶ × cos 60° = 5.0 × 10⁵ m/s. So r = mv sin θ/(qB) = 9.04 cm, and in each turn of 0.656 µs the proton moves p = 5.0 × 10⁵ × 6.56 × 10⁻⁷ = 0.328 m along the field, a pitch of 32.8 cm.

Worked example: a velocity selector

What speed passes straight through plates with an electric field of 100 kV/m across a 0.10 T magnetic field? The two forces cancel when qE = qvB, so v = E/B = 1.0 × 10⁵ ÷ 0.10 = 1.0 × 10⁶ m/s, whatever the charge or mass, because both forces are proportional to the charge. A proton at 1.1 × 10⁶ m/s feels a magnetic force 10 percent larger than the electric force, curves up and misses the slit; one at 1.5 × 10⁶ m/s strikes the upper plate. An electron at the same speeds curves the other way.

Worked example: separating neon-20 from neon-22

Where do singly charged neon ions accelerated through 2.0 kV land after half a circle in a 0.10 T field? An ion accelerated from rest gains kinetic energy qV, so its speed is v = √(2qV/m) and it lands a distance 2r = (2/B)√(2mV/q) from the slit.

  • Neon-20, with an ion mass of 3.320 × 10⁻²⁶ kg: v = 1.389 × 10⁵ m/s, and it lands 57.58 cm from the slit.
  • Neon-22, with 3.652 × 10⁻²⁶ kg: v = 1.325 × 10⁵ m/s, landing at 60.39 cm.
  • The two peaks are 2.81 cm apart. The ratio of their distances is √(21.991/19.992) = 1.049, the square root of the mass ratio.

Neon was the first stable element found to have isotopes. J. J. Thomson saw a second kind of neon atom, of mass 22, among positive rays bent by electric and magnetic fields in 1913, and Aston confirmed it with his mass spectrograph in 1919. Each pair offered here, at those settings:

Singly charged ions accelerated through 2.0 kV into a 0.10 T field
Ions Lighter lands at Heavier lands at Separation Abundances
²⁰Ne⁺ and ²²Ne⁺ 57.58 cm 60.39 cm 2.81 cm 90.5 and 9.25 percent
³⁵Cl⁺ and ³⁷Cl⁺ 76.15 cm 78.29 cm 2.14 cm 75.8 and 24.2 percent
²³⁵U⁺ and ²³⁸U⁺ 197.4 cm 198.7 cm 1.26 cm 0.72 and 99.3 percent

The masses and abundances are from NIST’s Atomic Weights and Isotopic Compositions. The uranium ions land 1.3 cm apart after a half circle 2 m across. That narrow margin is one reason separating uranium-235 this way, as the calutrons at Oak Ridge did in the 1940s, was so hard.

Why the period does not depend on the speed

A faster particle needs a larger centripetal force to turn it on the same circle, and the magnetic force grows with its speed by exactly the right amount, so it goes round a larger circle instead: r is proportional to v, and the time for one turn, 2πr/v = 2πm/(qB), does not change. That is what makes a cyclotron work. Its particles are pushed by an alternating voltage at the fixed frequency qB/(2πm), and they stay in step with it as they speed up and spiral outwards. It holds only while the particle is much slower than light, because at higher speeds the radius grows as the momentum γmv and the turns take longer.

The radius depends on the momentum and the charge, not on the speed alone, so an alpha particle, with about four times the proton’s mass and twice its charge, goes round a circle almost exactly twice as large at the same speed. A uniform magnetic field like the one here is what a current in a long coil makes: the Solenoid Magnetic Field Simulator shows how uniform the field inside a real coil is, and the Electric Field Simulator draws the fields of point charges, the other half of the Lorentz force.

What this simulation leaves out

  • Relativity. The motion is classical. The top of the speed range is a tenth of the speed of light, where the true radius, γmv/(qB), is 0.5 percent larger than the one shown; at 1.0 × 10⁶ m/s it is 6 parts in a million larger. The radius readout’s hint gives the figure for the speed set.
  • Radiation. An accelerated charge radiates, and a charge going round a circle is always accelerating, so a real electron slowly spirals inwards. At these speeds and fields the energy lost in one turn is far too small to see.
  • Real fields. Every field here is perfectly uniform and stops sharply at the edges drawn. Real magnets and plates have fringe fields at their edges, which bend a beam a little before it enters and after it leaves.
  • Other particles. Each particle moves alone. In a real beam the particles repel each other and collide with the gas left in the vacuum, which spreads the beam and the spectrometer’s peaks.
  • Gravity. The weight of a proton is about 10⁻²⁶ N, a trillion times smaller than the magnetic force on it at the opening settings, so it is left out.

Common mistakes

  • Getting the direction wrong for an electron. The right-hand rule for v × B gives the force on a positive charge. For an electron the force, and the sense of rotation, is the opposite.
  • Thinking the magnetic force speeds the particle up. It is always at right angles to the velocity, so it changes only the direction, and the kinetic energy stays the same.
  • Using the whole speed in r = mv/(qB) for a helix. Only the part across the field, v sin θ, goes round the circle; the part along it sets the pitch.
  • Expecting a faster particle to go round more often. It goes round a larger circle in the same time. The period depends only on the mass, the charge and the field.
  • Forgetting the units. B must be in tesla and v in m/s for r to come out in metres: 100 mT is 0.10 T, and 1 gauss is 10⁻⁴ T.
  • Thinking a velocity selector depends on the particle. Both forces are proportional to the charge, so v = E/B is the same for every particle. What differs is how sharply a particle at the wrong speed is thrown aside.

Model and assumptions

Method
Exact expression, no time stepping
Repeatability
Deterministic. The same link gives the same numbers on any machine.

What it assumes

  • The particle obeys Newton’s second law with the Lorentz force, m dv/dt = q(E + v × B), solved exactly for uniform fields, so every path is a circle, a helix or a circle carried along at the drift speed E/B.
  • The motion is classical: the mass does not grow with speed, which makes the radius shown 0.5 percent too small at the top speed, a tenth of the speed of light, and 6 parts in a million too small at 1,000 km/s.
  • The fields are perfectly uniform and end sharply at the edges drawn, with no fringe field where a beam enters or leaves.
  • The particle does not radiate, feels no gravity and meets nothing, and ions in the spectrometer neither repel each other nor collide with any gas.
  • Each ion is the neutral atom less one electron, with its mass and abundance from NIST, and starts from rest before the accelerating voltage.

Where it stops holding. Particles near the speed of light, whose radius grows as the relativistic momentum γmv and whose period lengthens with their energy, and fields that are not uniform, such as the Earth’s, where a particle also drifts across the field lines and can be reflected where the field strengthens.

Numerical accuracy

No time stepping, so nothing accumulates: every path is the exact solution of the Lorentz force law in uniform fields, and the radius, period, pitch, selected speed and landing points are closed forms, exact to rounding. The one number found by search is where a particle leaves the velocity selector or strikes a plate, found by halving an interval on the exact path until it is settled to the limit of double precision. The paths on screen are drawn as short straight pieces joining exact points.

Charged Particle in a Magnetic Field Simulator: the equation F = qvB sin θ, r = mv/(qB), T = (2π m)/(qB), v = E/B.
The equation the simulator is built on, with its source. Image © ScienceQuest, CC BY 4.0. Free to reuse with credit and a link to this page; how to reuse it. Download PNG

Common questions

What path does a charged particle follow in a magnetic field?

A circle, if it moves at right angles to a uniform field; a helix, if its velocity makes an angle with the field; and a straight line, if it moves along the field. The magnetic force, qvB sin θ, always acts at right angles to the velocity, so it turns the particle without changing its speed, and the part of the velocity along the field is not affected at all.

How do you calculate the radius of a charged particle in a magnetic field?

Set the magnetic force equal to the centripetal force, qvB = mv²/r, which gives r = mv/(qB). A proton, m = 1.673 × 10⁻²⁷ kg and q = 1.602 × 10⁻¹⁹ C, moving at 1.0 × 10⁶ m/s across a 0.10 T field goes round a circle of radius 0.104 m, or 10.4 cm. For a helix, use only the part of the velocity across the field, v sin θ.

Why does the period not depend on the speed?

Because the radius grows in proportion to the speed, so a faster particle goes round a larger circle in the same time: T = 2πr/v = 2πm/(qB). For a proton in 0.10 T that is 0.656 µs, a cyclotron frequency of 1.52 MHz, at every speed. A cyclotron relies on this. It stops being true as the speed approaches that of light, when the mass in the formula becomes γm.

Does a magnetic field do work on a charged particle?

No. The magnetic force is always at right angles to the velocity, so it has no part along the motion and does no work: the speed and the kinetic energy stay the same, and only the direction changes. An electric field, by contrast, can speed a charge up or slow it down.

How does a velocity selector work?

It crosses an electric field with a magnetic field so the two forces on a moving charge point in opposite directions. They cancel when qE = qvB, so only particles at v = E/B pass straight through, whatever their charge or mass. With 100 kV/m and 0.10 T the selected speed is 1.0 × 10⁶ m/s; faster particles are bent one way and slower ones the other.

How does a mass spectrometer separate isotopes?

Ions of the same charge accelerated through the same voltage V all gain the same energy, qV, and then follow half circles of radius r = √(2mV/q)/B in a magnetic field, so heavier ions land further out. Singly charged neon-20 and neon-22 ions accelerated through 2.0 kV into 0.10 T land 57.58 cm and 60.39 cm from the entry slit, 2.81 cm apart.