Loading the engineShared by all simulations, so the next one opens instantly.
The physics

Crossed electric and magnetic fields sort charged particles by speed. J. J. Thomson used the trick in 1897: he adjusted the two fields until their deflections of a cathode ray cancelled, read off the speed of the electrons as E/B, and from that their charge to mass ratio. A year later Wilhelm Wien deflected beams of positive ions, the canal rays, with electric and magnetic fields and found charge to mass ratios close to that of the hydrogen ion, nearly two thousand times smaller than for electrons. The velocity selector built on this principle carries his name, and Wien filters still pick out ions or electrons of one speed in mass spectrometers, ion beam lines and electron microscopes.

What you see

A bunch of particles starts at the bottom of the canvas, all from the same point and moving straight up, each with a different speed. Between the two horizontal lines lies the filter, 460 pixels tall, with an electric field pointing to the right (the yellow arrows) and a magnetic field pointing into the screen (the crosses). Outside it the particles move in straight lines. The line near the top marks a detector. Each particle is colored by its speed relative to the selected speed E/B: blue for slower, red for faster, green close to it. When every particle of a bunch has left the canvas, the next bunch starts. Each frame advances the motion by four steps of 1/240 s, so at the default speed setting one second of simulated time takes one second.

Governing equation

The Lorentz force with charge to mass ratio q/m=1 gives

d𝐯dt=𝐄+𝐯×𝐁.

For a particle moving straight up at speed u, the electric force pushes it right with strength E and the magnetic force pushes it left with strength uB. They cancel when

u=vsel=EB,

so that particle crosses the filter without turning. Any other particle moves as the sum of two motions: a drift straight up at E/B and a circle of radius |u−E/B|/B traversed with angular frequency B. Faster particles circle to the left, slower ones to the right. At the default fields E=200 and B=1 the selected particle needs 2.3 s to cross the filter, a good third of the 6.3 s it takes to complete a circle, so the sideways displacement Δx=−(Δu/B)(1−cos⁡Bt), with Δu=u−E/B, is well beyond the small angle limit where it would grow in proportion to t2. A particle faster than about 5.6E/B completes a loop before it gets far and leaves the filter again through the entrance.

Presets

All four presets use E=200 and B=1, so vsel=200 pixels per second.

Matched beam: 15 particles with speeds from 100 to 300, centered on vsel. The particle at 200 reaches the detector after 3.3 s exactly above its starting point. The fastest one arrives after 2.6 s, 159 pixels to the left; the slowest after 4.1 s, 196 pixels to the right. A new bunch starts every 4.7 s.

Narrow beam: 20 particles from 180 to 220 pixels per second. A spread of 20% in speed becomes a fan 76 pixels wide at the detector. A new bunch starts every 4.2 s.

Wide spread: 30 particles from 20 to 380 pixels per second. The slowest particle needs 9.4 s to reach the detector and lands 357 pixels to the right; the deflection of the fastest ones levels off about 200 pixels to the left, because they spend less time in the filter. A new bunch starts every 9.8 s.

Detuned beam: 15 particles from 210 to 390 pixels per second, all faster than vsel. The whole fan lands to the left of center, between 19 and 202 pixels off. A new bunch starts every 4.1 s.

Parameters

Distances are in pixels and times in seconds, so speeds are in pixels per second, E in pixels per second squared and B in radians per second.

Electric field E: from 50 to 500. Acts at once, also on particles already in flight.

Magnetic field B: from 0.1 to 3. Acts at once. Together with Electric field E it sets the selected speed E/B and the angular frequency B of the circling motion.

Beam speed v₀ (pixels per second): the center of the speed range, from 50 to 500. Applies on Reset.

Speed spread: the half width of the speed range as a fraction of the beam speed, from 0 to 1. The speeds are evenly spaced between v0(1−s) and v0(1+s), but never below 0.05v0. Applies on Reset.

Particles per bunch: from 2 to 40. Applies on Reset.