Skip to content

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 ν=nK\nu = nK is constant. The method then collides a marker within one step with probability p=(1−e−sνΔt)/sp = (1 - e^{-s\nu\Delta t})/s, where ss is the bound safety factor, and the expectations are exact functions of the step count:

TestExpectationTolerance
collided fraction in one step(1−e−νmax⁡Δt) ν/νmax⁡(1 - e^{-\nu_{\max}\Delta t})\,\nu/\nu_{\max}5σ
attachment, electron survival(1−p)n(1 - p)^n2 %
ionization, electron growth(1+p)n(1 + p)^n, and ne−nin_e - n_i constant2 %
equal-mass elastic, mean energy32kTg+(E0−32kTg) e−νefft/2\tfrac32kT_g + (E_0 - \tfrac32kT_g)\,e^{-\nu_{\rm eff}t/2}2 %
resonant charge exchange of a drifting beamTg+(T0−Tg)f+Mu023kf(1−f)T_g + (T_0-T_g)f + \frac{Mu_0^2}{3k}f(1-f), f=(1−p)nf = (1-p)^n2 %
thermal ions on a gas at the same temperaturemean energy unchanged (detailed balance)1 %
cold ions in a 300 K gasrelax to 300 K and stay there2–3 %
density profilecollision probability proportional to the local density, zero where it is zero5–8 %
ions in a flowing, heated gasrelax to the gas’s flow velocity and local temperature5 %
ions in a uniform field EEdrift vd=qE/(μν)v_d = qE/(\mu\nu) and Wannier’s mean energy 32kTg+12(m+M)vd2\tfrac32kT_g + \tfrac12(m+M)v_d^23 %
marker mergingweight, momentum and kinetic energy unchangedexact
ion-impact ionizationenergy and momentum conserved up to the electron’s O(me/M)O(\sqrt{m_e/M}) termsexact
Opal–Peterson–Beaty sharingmean secondary energy wln⁡(1+(R/2w)2)/(2arctan⁡(R/2w))w\ln(1+(R/2w)^2)/(2\arctan(R/2w))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.