# X-ray Physics Simulator - Tube Spectrum, Moseley’s Law, Bragg Diffraction, Compton Scattering

> X-ray tube spectra with Kα/Kβ lines and filters, Moseley’s law, Bragg diffraction with powder patterns, and Compton scattering with Klein–Nishina plots.

- URL: https://qilingtools.com/en/physics/xray
- Category: Physics Tools (https://qilingtools.com/en/physics)
- Tags: [Physics](https://qilingtools.com/en/tags/physics), [Education](https://qilingtools.com/en/tags/education)
- Last updated: 2026-10-29
- Price: Free, no sign-up
- Privacy: Runs locally in the browser; files are never uploaded

Four classic pieces of X-ray physics on one page: the continuous and characteristic spectrum of an X-ray tube, Moseley’s law, Bragg diffraction from crystals, and Compton scattering. The tube spectrum follows Kramers’ law with the Duane–Hunt cutoff and tabulated Kα and Kβ energies for each anode, with optional Ni, Zr or Al filters. The diffraction panel uses the lattice and atomic form factors to list every allowed (hkl) with 2θ and relative intensity, draws a powder pattern, and shows 2d sinθ = nλ on a draggable diagram.

## How to use

1. In Tube spectrum choose an anode, voltage and filter, and read λ_min, efficiency and the Kβ/Kα ratio
2. In Moseley’s law pick an element, or enter a Kα energy to work out the atomic number
3. In Bragg diffraction choose a crystal and wavelength, read the peak table and powder pattern, and drag the diagram to change the angle
4. In Compton scattering choose the photon energy and drag the scattering angle to read E′, Δλ, electron recoil and cross-sections

## Features

- Kramers continuum plus Kα₁/Kα₂/Kβ lines for Cu, Mo, W, Rh, Ag, Co, Fe and Cr, on an energy or wavelength axis with optional log scale
- Be window and Ni, Cu, Zr or Al filter attenuation including absorption edges — see how a β filter works
- Moseley √f vs Z plot with measured Kα₁ for 57 elements, the theory line and a fitted screening constant
- NaCl, KCl, Si, diamond, Cu, Al, Fe, W, CsCl and Po: structure factor, multiplicity, LP factor and Kα₂ doublet
- Draggable Bragg reflection diagram with the N-plane interference function
- Compton shift, electron recoil angle and energy, Compton edge, Klein–Nishina polar plot and total cross-section

## FAQ

### Why does an X-ray spectrum have a shortest wavelength?

An electron accelerated through V volts has kinetic energy eV, and at most all of it goes into one photon. So photon energies stop at eV, giving λ_min = hc/eV ≈ 12.398/V(kV) Å — the Duane–Hunt limit, which does not depend on the anode. The characteristic lines, by contrast, sit at energies set by the anode’s atomic levels.

### How does a nickel filter remove Cu Kβ?

Nickel’s K edge at 8.333 keV falls between Cu Kα (8.048 keV) and Kβ (8.905 keV). Above the edge absorption jumps about sevenfold, so 20 μm of Ni cuts Kβ to below 1% of Kα while keeping about half of Kα. Molybdenum tubes use a zirconium filter for the same reason.

### Why is the NaCl (111) peak weak and the KCl one almost missing?

In the rock-salt structure the structure factor is 4(f_A + f_B) for all-even indices and 4(f_A − f_B) for all-odd ones. Na⁺ and Cl⁻ have very different electron counts, so (111) is still visible. K⁺ and Cl⁻ both have 18 electrons, their form factors nearly cancel, and KCl’s pattern looks like simple cubic.

### Why doesn’t the Compton shift depend on the incident wavelength?

Conservation of energy and momentum for a photon hitting a free electron gives Δλ = (h/m_ec)(1 − cosθ), where h/m_ec = 2.426 pm depends only on the electron mass. For visible light this is negligible, but for X-rays and gamma rays it is large, which is how Compton’s 1923 experiment with Mo Kα showed that light comes in particle-like quanta.

### How accurate are the intensities?

Peak positions (2θ, d-spacings, line energies) are exact. Powder intensities use |F|² × multiplicity × LP with Cromer–Mann form factors and ignore absorption, preferred orientation and extinction, so they agree with reference patterns to within roughly 10–20%. In the tube spectrum the height of the lines relative to the continuum is an empirical, illustrative scaling.

## Related tools

- [Unit Converter](https://qilingtools.com/en/math/unit): Free online unit converter: length, area, volume, weight, temperature, time, speed, data, pressure, energy and angle — one value converts every unit at once.
- [Vector Calculator](https://qilingtools.com/en/math/vector): Free online vector calculator for 2D and 3D: addition, scalar multiples, dot and cross products, magnitude, angle, unit vector and projections, with checks.
- [Significant Figures Calculator](https://qilingtools.com/en/math/significant-figures): Free online sig fig calculator: count significant figures digit by digit, round to N sig figs or decimals with six rounding modes, and compute by sig fig rules.
- [Tone Generator](https://qilingtools.com/en/audio/tone-generator): Free online tone generator: sine, square, sawtooth and triangle waves from 1 to 20,000 Hz, a note picker, sweeps, white/pink/brown noise and a WAV download.
- [Audio Spectrogram](https://qilingtools.com/en/audio/spectrogram): Free online spectrogram generator: see time, frequency and level from a Hann-windowed STFT, with FFT size, log axis, dB range and colour maps. Exports PNG.
- [Decibel Meter](https://qilingtools.com/en/audio/decibel): Free online decibel meter: measure noise with your mic in real time, A/C/Z weighting, fast/slow response, min/max/average/Leq, 60-second graph and calibration.
- [Physics Formula Calculator](https://qilingtools.com/en/physics/physics): Physics formulas solved with steps: SUVAT, projectiles, Newton’s laws, inclines, energy, Ohm’s law, resistors, RC, buoyancy, waves, lenses, gravity.
- [Fourier Series & FFT Visualizer](https://qilingtools.com/en/math/fourier): Fourier series coefficients and animated partial sums for square, sawtooth, triangle or any function (Gibbs), draw-your-own epicycles and FFT spectra.
