Mass Spectrometer Simulator Back
Analytical Instruments Simulator

Mass Spectrometer Simulator — Mass Separation by Circular Motion in a Magnetic Field

Compute the ion speed v = sqrt(2qV/m), the circular-orbit radius r = mv/(qB), the mass-to-charge ratio m/q and the kinetic energy KE in real time from the charge number z, mass m, acceleration voltage V and magnetic flux density B. A schematic of the ion source, accelerator, magnetic sector and detector together with an r-versus-m/z curve makes the principle of magnetic-sector mass spectrometry intuitive.

Parameters
Charge number z
e
Mass m
u
Acceleration voltage V
V
Magnetic flux density B
T

Defaults are singly-charged Ar (z=1, m=40 u, V=2000 V, B=0.50 T). Elementary charge e = 1.602e-19 C, atomic mass unit u = 1.6605e-27 kg, relativistic corrections neglected. Mass in u, field in T, voltage in V.

Results
Ion speed v
Circular radius r
Mass-to-charge m/q
Kinetic energy KE
Mass spectrometer schematic

Left = ion source and accelerator (voltage V) / centre = magnetic-field region B (x marks point into the page) / three deflected trajectories (blue = light ion, yellow = current m, red = heavy ion) / right edge = detector plane

Circular radius r versus mass-to-charge m/z

X = m/z (u/e, 1 to 250) / Y = r (mm) / blue curve = r = (1/B) sqrt(2 m V / q) / yellow dot = current m/z

Theory & Key Formulas

An ion of charge q = ze accelerated through voltage V gains kinetic energy qV, which fixes its speed.

Ion speed after acceleration:

$$v = \sqrt{\frac{2qV}{m}}$$

Radius in a magnetic field (Lorentz force = centripetal force):

$$r = \frac{m v}{q B} = \frac{1}{B}\sqrt{\frac{2 m V}{q}}$$

Mass-to-charge ratio (in u/e):

$$\frac{m}{q} = \frac{r^{2} B^{2}}{2 V}$$

Kinetic energy:

$$KE = q V = \tfrac{1}{2} m v^{2}$$

Here $q = ze$ ($e = 1.602\times10^{-19}$ C), $m$ is the ion mass [kg] (1 u = $1.6605\times10^{-27}$ kg), $V$ the acceleration voltage [V], $B$ the magnetic flux density [T] and $r$ the radius [m]. Relativistic corrections are negligible for v < 0.1c.

What is the Mass Spectrometer Simulator?

🙋
My chemistry class mentioned a mass spectrometer that uses a magnet to bend ions and measure their mass. I get the picture but the actual physics still feels fuzzy.
🎓
The short version is: "ions accelerated by the same voltage curve more if they are lighter." Once charge q is accelerated by voltage V the speed becomes v = sqrt(2qV/m). In a uniform magnetic field B the Lorentz force qvB balances the centripetal force mv^2/r, giving a circular radius r = mv/(qB). The defaults here (Ar+, z=1, m=40 u, V=2000 V, B=0.5 T) yield v about 98 km/s and r about 81.5 mm.
🙋
Is 81.5 mm anywhere near the size of a real instrument?
🎓
Real magnetic-sector spectrometers typically run radii of 100 to 300 mm, so yes — same order of magnitude. Push V from 2000 to 8000 V and the radius doubles (sqrt(4)=2) to 163 mm. Double B from 0.5 to 1.0 T and the radius halves to 40.7 mm. Detectors are fixed in place, so real instruments scan V or B until the target m/q lands on the detector — this is called "voltage scanning" or "magnetic scanning."
🙋
The card says "mass-to-charge m/q = 40.0 u/e". Why is m/q the headline number?
🎓
A spectrometer never measures m directly — only m/q. Look at r^2 = 2mV/(qB^2): from r, V and B you can only recover m/q. That is why multiply-charged ions create overlaps. For example Ar^2+ (m=40, z=2) sits at m/q = 20 u/e and arrives at the same detector position as Ne+ (m=20, z=1) — the classic "doubly-charged peak." Set z to 2 in this tool and m/q drops to 20.0 u/e.
🙋
And what is the "KE = 2.0 keV" stat telling me?
🎓
It is the kinetic energy picked up in the accelerator, KE = qV. For z=1, V=2000 V gives KE = 2000 eV = 2.0 keV. With z=2 the same voltage gives 4 keV. Real machines use a few keV up to 30 keV: too low loses sensitivity, too high causes sputtering of the electrodes. In this tool, sweeping V from 100 V up to 10 kV simply scales KE linearly, while v scales as sqrt(V). Relativistic corrections only matter beyond about 100 keV for heavy ions, far outside our range.

Frequently Asked Questions

An ion of charge q gains kinetic energy qV = mv^2/2 in the accelerator, so its speed is v = sqrt(2qV/m). In the magnetic field B the Lorentz force qvB supplies the centripetal force, giving a circular radius r = mv/(qB) = (1/B) sqrt(2mV/q). For fixed V and B the radius scales as sqrt(m/q), so the detector position fixes m/q. With the default Ar+ (z=1, m=40 u, V=2000 V, B=0.50 T) the tool returns r about 81.5 mm; switching to Kr+ (m=84 u) the radius grows by about sqrt(84/40) = 1.45.
From r = (1/B) sqrt(2mV/q) the radius scales as sqrt(V) and as 1/B. Multiplying V by 4 doubles the radius; doubling B halves the radius. Starting from the defaults (z=1, m=40 u, V=2000 V, B=0.50 T) the tool shows r = 81.5 mm, which becomes 163 mm at V = 8000 V and 40.7 mm at B = 1.00 T. Real instruments scan V or B so that successive m/q values land on the same detector position.
Higher charge q = ze increases both the accelerated energy and the Lorentz force. The radius becomes r = (1/B) sqrt(2mV/(ze)), shrinking as 1/sqrt(z). Ar 40 with z = 2 has a radius about sqrt(1/2) = 0.71 times the singly-charged case, so 57.6 mm in the defaults. The reported m/z falls to 20 u/e, so the peak coincides with that of a singly-charged ion of mass 20 u — a classic source of peak overlap in mass spectra.
This tool is an idealised magnetic-sector model. It ignores: (1) non-uniform fields in the accelerator, (2) magnetic-fringe effects at the sector edges, (3) initial-velocity spread and space-charge effects, (4) detector resolving power, and (5) collision scattering at finite vacuum. Real machines reach resolving power m/dm of 10^3 to 10^6, but here ions are point particles. Quadrupole (QMS) and time-of-flight (TOF) instruments use different principles and are out of scope. Use this as an intuition-builder, not a design tool.

Real-World Applications

Isotope-ratio mass spectrometry (IRMS): Climate scientists and geologists use carbon-12/13 and oxygen-16/18 ratios to reconstruct palaeoclimates and to identify the photosynthetic pathway (C3 vs C4) of plants. Resolving a 1 u mass difference at m about 12 requires detecting a 0.5% change in r, which on a 200 mm machine is 1 mm. Move m from 12 to 13 u in this tool and watch the radius shift by about 4%. Real instruments amplify that shift by multi-sector and double-focusing optics.

Organic structure analysis (GC-MS): Gas chromatography combined with mass spectrometry is the workhorse of forensic and environmental analysis: the molecular ion M+ plus characteristic fragment ions form a "fingerprint." Caffeine (m=194) shows m/z = 194 (M+), 165 (de-methyl), 137 and so on. At V=2000 V and B=0.50 T the m=194 ion in this tool lands at sqrt(194/40) x 81.5 about 179 mm, while m=137 reaches 150 mm — easily separated at the detector.

Semiconductor dopant analysis (SIMS): Secondary-ion mass spectrometry measures boron and phosphorus concentrations in silicon wafers down to ppt (10^-12). For Si (m=28) the overlap with CO+ (m=28) and N2+ (m=28) forces the use of high-resolution magnetic-sector machines with m/dm > 5000. This idealised tool has infinite resolution because it treats ions as point particles, but real resolution is set by energy spread and beam width.

Planetary exploration: The SAM instrument on NASA's Mars Curiosity rover (a quadrupole, but the m/q sorting principle is the same) detects H2O, CO2 and CH4 released from heated soil, mapping planetary history. Set m to 18 (water), 44 (CO2) or 16 (methane) in this tool and the radii are very different. Combining mass spectra with gas-chromatography retention times secures identification even when isobars overlap.

Common Misconceptions and Pitfalls

The most common misconception is that a mass spectrometer measures mass directly. It actually measures the mass-to-charge ratio m/q (often written m/z), which means multiply-charged ions and isobars can overlap. N2+ (28 u, z=1) and CO+ (28 u, z=1) both sit at m/q = 28 u/e and can only be separated by ultra-high resolution machines (FT-ICR, Orbitrap) reaching m/dm of 10^5. Set z=2 with m=40 in this tool and m/z falls to 20, landing on another peak's position.

Another myth is that "a stronger magnet always separates better." From r = (1/B) sqrt(2mV/q), increasing B actually shrinks the radius and reduces the absolute separation distance between adjacent masses. The trick used in practice is either a high-field superconducting magnet for compactness plus higher resolving optics, or a higher voltage V to enlarge both the radius and the absolute separation. Drop B to 0.05 T in this tool and the radius blows up by 10x, beyond any realistic instrument.

Finally, many beginners think that raising the acceleration voltage automatically boosts sensitivity. Sensitivity is set by the ion source efficiency and the detector response, not by V. Higher V increases v as sqrt(V), so the time spent at the detector shrinks and the signal integration window narrows, which can actually hurt the signal-to-noise ratio. Real instruments have an optimal V (typically 3 to 10 kV); this tool varies V linearly without modelling that sensitivity curve.