Validation
Besides unit tests of every kind’s kinematics (exact energy loss, energy sharing, isotropy, products), the test suite checks the operator in a 0D reactor against closed-form solutions. With Maxwell-molecule cross sections the frequency is constant. The method then collides a marker within one step with probability , where is the bound safety factor, and the expectations are exact functions of the step count:
| Test | Expectation | Tolerance |
|---|---|---|
| collided fraction in one step | 5σ | |
| attachment, electron survival | 2 % | |
| ionization, electron growth | , and constant | 2 % |
| equal-mass elastic, mean energy | 2 % | |
| resonant charge exchange of a drifting beam | , | 2 % |
| thermal ions on a gas at the same temperature | mean energy unchanged (detailed balance) | 1 % |
| cold ions in a 300 K gas | relax to 300 K and stay there | 2–3 % |
| density profile | collision probability proportional to the local density, zero where it is zero | 5–8 % |
| ions in a flowing, heated gas | relax to the gas’s flow velocity and local temperature | 5 % |
| ions in a uniform field | drift and Wannier’s mean energy | 3 % |
| marker merging | weight, momentum and kinetic energy unchanged | exact |
| ion-impact ionization | energy and momentum conserved up to the electron’s terms | exact |
| Opal–Peterson–Beaty sharing | mean secondary energy | 2 % |
The drift velocity and the Wannier energy hold exactly for a Maxwell-molecule cross section with
isotropic scattering, which makes the field test a check of the field push and the collision
kinematics together: a swarm benchmark with a closed-form answer. For real gases, compare the
same reactor diagnostics (mean_velocity, mean_energy_ev and the collision counts) with a
Boltzmann solver such as BOLSIG+ for the same cross-section set.
The whole suite runs on NumPy and on cunumpy’s stand-in for CuPy in CI, and the combined coverage of the two runs is 100 %. The tutorials plot several of these comparisons.