Skip to content
Projects

Overview

plasmacoll collides charged markers with prescribed neutral gases by the null-collision Monte Carlo method: the collision step of a particle-in-cell code, or of a homogeneous reactor in a constant electric field. Around the operator it has the cross sections (tables and fits), their rate coefficients over a Maxwellian or any electron distribution, a two-term Boltzmann solver for the electrons of a gas mixture and the charge-state fractions of a fast beam, all from the same CollisionProcess objects. Collisions never change the targets: the gas is an input.

Each equation on these pages is declared on the code that implements it, as a method card, and checked by the tests: 35 closed forms and fits against SymPy rules, seven discretisations against their order of convergence. The pages of the section list the cards module by module; this one shows how they fit together.

Markers are positions, velocities and weights in NumPy or CuPy arrays; a product takes the position and weight of the incident marker.

  1. Neutral backgrounds: drifting Maxwellians with density and temperature profiles, from which each candidate draws a partner velocity.
  2. Cross sections tabulated against the centre-of-mass or the lab energy, linear between their points.
  3. Null-collision method: the frequency of every process, its bound over all speeds, and the step: a marker is a candidate with probability 1−e−νmax⁡Δt1 - e^{-\nu_{\max}\Delta t} and then collides with process kk with probability νk/νmax⁡\nu_k/\nu_{\max}:

collide

functionsource

Collide one species' markers for one time step dt (s).

max speed
gmax⁡,b=vmax⁡+∣ub∣+8e TbFT,bMb,vmax⁡=max⁡i∣vi∣g_{\max,b} = v_{\max} + |\mathbf u_b| + 8\sqrt{\frac{e\,T_b F_{T,b}}{M_b}}, \qquad v_{\max} = \max_i |\mathbf v_i|
probability
P=1−e−νmax⁡ΔtP = 1 - e^{-\nu_{\max}\Delta t}
selection
∑j<kνj≤R νmax⁡<∑j≤kνj ⇒ process k,R νmax⁡≥∑jνj ⇒ null collision\sum_{j<k}\nu_j \le R\,\nu_{\max} < \sum_{j\le k}\nu_j \ \Rightarrow\ \text{process } k, \qquad R\,\nu_{\max} \ge \sum_j \nu_j \ \Rightarrow\ \text{null collision}
rate
P νkνmax⁡=νkΔt+O((νmax⁡Δt)2)P\,\frac{\nu_k}{\nu_{\max}} = \nu_k\Delta t + O\big((\nu_{\max}\Delta t)^2\big)
Assumes
  • at most one collision per marker and step, so νmax⁡Δt≪1\nu_{\max}\Delta t \ll 1; warns once when PP exceeds max_collision_probability (0.1)
  • with a NumPy generator the gaps between candidates are geometric(P)(P), the same independent draw per marker at O(candidates); other generators draw one number per marker
  • each candidate draws one neutral velocity w\mathbf w per background and RR uniform in [0,1)[0, 1); the real frequencies use the density factor where the marker is (exact thinning)
  • candidates whose total frequency exceeds νmax⁡(1+10−9)\nu_{\max}(1 + 10^{-9}) are counted in bound_violations and warned about once: their rate is too low
  • FT,bF_{T,b} the largest temperature factor; eight thermal speeds leave about 10−1510^{-15} per component for a faster neutral
References
Built from
  1. Collision kinematics of each kind of process (elastic, excitation, ionization with its energy sharing, attachment, charge exchange, stripping, beam ionization…) in the centre-of-mass frame, with the scattering angles of the null-collision page.
  2. Merging and splitting keep the number of markers in bounds, conserving weight, momentum and energy; the zero-dimensional reactor adds a field and repeats the step.
  • Rate coefficients: ⟨σg⟩\langle\sigma g\rangle over a Maxwellian of relative speeds, tabulated in log-log, and the rate over a tabulated electron energy distribution.
  • Two-term Boltzmann solver: the steady electron energy distribution in a reduced field, with Scharfetter-Gummel fluxes and collision integrals that conserve the particles exactly, and from it the transport and rate coefficients:

solve_eedf

functionsource

Return the steady electron energy distribution in a uniform DC field.

boltzmann
ddε(WF0−D dF0dε)=S,∫ε1/2F0 dε=1\frac{d}{d\varepsilon}\Big(W F_0 - D\,\frac{dF_0}{d\varepsilon}\Big) = S, \qquad \int \varepsilon^{1/2} F_0\,d\varepsilon = 1
coefficients
W=−γ ε2σε,D=γ3(EN)2εσ~m+γ kT ε2σε,γ=2emeW = -\gamma\,\varepsilon^2 \sigma_\varepsilon, \qquad D = \frac{\gamma}{3}\Big(\frac{E}{N}\Big)^2 \frac{\varepsilon}{\tilde\sigma_m} + \gamma\,kT\,\varepsilon^2 \sigma_\varepsilon, \qquad \gamma = \sqrt{\frac{2e}{m_e}}
superelastic
σjsup(ε)=glgu(1+ΔEjε) σj(ε+ΔEj) on the upper state, fraction xu,j=xgas pu\sigma^\mathrm{sup}_j(\varepsilon) = \frac{g_l}{g_u}\Big(1 + \frac{\Delta E_j}{\varepsilon}\Big)\,\sigma_j(\varepsilon + \Delta E_j) \ \text{on the upper state, fraction } x_{u,j} = x_\mathrm{gas}\,p_u
cross sections
σε=∑elasticxj 2meMj σj,σm=∑allxjσj+∑supxu,jσjsup,σ~m={max⁡(σm+νˉNγε1/2, 0.01 σm)temporal growthσmspatial growth\sigma_\varepsilon = \sum_\mathrm{elastic} x_j\,\frac{2m_e}{M_j}\,\sigma_j, \qquad \sigma_m = \sum_\mathrm{all} x_j \sigma_j + \sum_\mathrm{sup} x_{u,j}\sigma^\mathrm{sup}_j, \qquad \tilde\sigma_m = \begin{cases} \max\Big(\sigma_m + \dfrac{\bar\nu}{N\gamma\varepsilon^{1/2}},\ 0.01\,\sigma_m\Big) & \text{temporal growth} \\ \sigma_m & \text{spatial growth} \end{cases}
growth
S+=−νˉNε1/2F0 (temporal);W+=−γ3ENαNεσm,S+=γ3αN(ENεσmdF0dε+αNεσmF0) (spatial)S \mathrel{+}= -\frac{\bar\nu}{N}\varepsilon^{1/2} F_0 \ \text{(temporal)}; \qquad W \mathrel{+}= -\frac{\gamma}{3}\frac{E}{N}\frac{\alpha}{N}\frac{\varepsilon}{\sigma_m}, \quad S \mathrel{+}= \frac{\gamma}{3}\frac{\alpha}{N}\Big(\frac{E}{N}\frac{\varepsilon}{\sigma_m}\frac{dF_0}{d\varepsilon} + \frac{\alpha}{N}\frac{\varepsilon}{\sigma_m}F_0\Big) \ \text{(spatial)}
flux
Jk+1/2=Dh[B(−z) Fk−B(z) Fk+1],z=WhD,B(z)=zez−1J_{k+1/2} = \frac{D}{h}\big[B(-z)\,F_k - B(z)\,F_{k+1}\big], \qquad z = \frac{Wh}{D}, \qquad B(z) = \frac{z}{e^z - 1}
collisions
F0(ε)=Fk esk(ε−εk) in cell k,qn=γ εnσ(εn) ωn esk(εn−εk),Akk+=xj∑n∈kqnF_0(\varepsilon) = F_k\,e^{s_k(\varepsilon - \varepsilon_k)} \text{ in cell } k, \qquad q_n = \gamma\,\varepsilon_n \sigma(\varepsilon_n)\,\omega_n\,e^{s_k(\varepsilon_n - \varepsilon_k)}, \qquad A_{kk} \mathrel{+}= x_j\sum_{n \in k} q_n
kernel
Kcnuniform=2 ∣[εc−1/2,εc+1/2]∩[0,r]∣r,KcnOpal=G(εc+1/2)−G(εc−1/2)+G(r−εc−1/2)−G(r−εc+1/2),G(E)=arctan⁡(min⁡(E,r/2)/w)arctan⁡(r/2w),r=εn−ΔEK_{cn}^\mathrm{uniform} = \frac{2\,\big|[\varepsilon_{c-1/2}, \varepsilon_{c+1/2}] \cap [0, r]\big|}{r}, \qquad K_{cn}^\mathrm{Opal} = G(\varepsilon_{c+1/2}) - G(\varepsilon_{c-1/2}) + G(r - \varepsilon_{c-1/2}) - G(r - \varepsilon_{c+1/2}), \qquad G(E) = \frac{\arctan(\min(E, r/2)/w)}{\arctan(r/2w)}, \quad r = \varepsilon_n - \Delta E
normalisation
∑kwkFk=1,wk=23(εk+1/23/2−εk−1/23/2)\sum_k w_k F_k = 1, \qquad w_k = \tfrac23\big(\varepsilon_{k+1/2}^{3/2} - \varepsilon_{k-1/2}^{3/2}\big)
Order
2
Assumes
  • two-term expansion in a uniform DC field; xjx_j the mole fractions from the mixture's densities; kTkT the density-weighted gas temperature unless given
  • a state's fraction is its population pp times the fraction of its gas, its mass that of the gas
  • excitation and dissociation move electrons down by ΔE\Delta E (into the cell of ε−ΔE\varepsilon - \Delta E), superelastic collisions up (into the cell of ε+ΔE\varepsilon + \Delta E, only from ε+ΔE\varepsilon + \Delta E below the grid end, with εσsup\varepsilon\sigma^\mathrm{sup} evaluated from σj\sigma_j so that it stays finite at ε=0\varepsilon = 0); ionization replaces one electron by two sharing ε−ΔE\varepsilon - \Delta E (equal: the cell of (ε−ΔE)/2(\varepsilon - \Delta E)/2, twice; uniform and Opal: the kernel KK, whose columns sum to 2); attachment removes them: the columns of the operator sum to zero, so particles are conserved exactly
  • uniform grid of NN = num_cells (200) cells, FkF_k at the centres; B(z)=1−z/2B(z) = 1 - z/2 for ∣z∣<10−10|z| < 10^{-10}, DD floored at 10−30010^{-300}; no flux through ε=0\varepsilon = 0 and the grid end
  • collision integrals by 3-point Gauss-Legendre on the sub-intervals between the edges, table energies, threshold and the edges shifted by ΔE\Delta E (by −ΔE-\Delta E for superelastic, 2ε+ΔE2\varepsilon + \Delta E for equal sharing); sks_k the harmonic mean (van Leer) of the one-sided differences of ln⁡max⁡(F,10−300)\ln\max(F, 10^{-300}), zero at an extremum, clipped to ±50/h\pm 50/h
  • spatial growth: the gradient term split half and half to the cells next to each edge, the (α/N)2(\alpha/N)^2 term diagonal
  • the first row replaced by the normalisation; a dense solve per iteration, negative values clipped; iterated (damped when the error grows) until ∑k∣ΔFk∣wk<\sum_k |\Delta F_k| w_k < rtol (10−810^{-8})
  • without max_energy the grid end is adjusted (from 10 eV, at most 40 times, with temporal growth) until F0F_0 falls by 10 to 20 decades across the grid; spatial growth is then solved on that grid from the temporal solution
  • the gas temperature enters the inelastic terms only through the superelastic collisions of the populated levels; not included: electron-electron collisions, the continuous approximation for rotations (CAR), the O(me/M)O(m_e/M) frame correction of table energies; elastic processes with the momentum-transfer cross section (isotropic) only
  • the order is that of the mean energy on a fixed grid (Reid's ramp model)
References
Built from
  • Charge states of a fast beam along a path, by the matrix exponential of the transition matrices, and the same cross sections as Monte Carlo processes; beam in gas assembles them for a hydrogen or deuterium beam in H₂.

The fits are cards too, with their sources and ranges of validity: H₂ and H⁻ (Janev, Reiter and Samm), hydrogen atoms, elastic e + H, H₂ (Park et al.), secondary electrons of fast ions (Rudd), surface yields (Vaughan), Ar⁺ in argon (Phelps), metals (Lotz), caesium, fusion reactions (Bosch and Hale) with the reactivity of a fast ion in a Maxwellian target, and vibrational populations. Electron-argon sets are LXCat files the user downloads; the proton tables of proton_hydrogen_processes are inputs.

Energies and temperatures (kTkT) in eV, masses, speeds, densities and cross sections in SI (CODATA 2018; ee and kBk_B exact), the reduced field in Td (10−2110^{-21} V m²). Electron cross sections are looked up at the electron’s energy with the target at rest (lab frame), ion-neutral ones mostly at the centre-of-mass energy; every process says which. F0F_0 is normalised by ∫ε1/2F0 dε=1\int \varepsilon^{1/2} F_0\,d\varepsilon = 1.

  • Coulomb collisions, recombination, and collisions between two tracked species (except a tracked species as the target of a DynamicProfile, which the collisions do not change).
  • More than one collision per marker and step; products collide from the next step on.
  • The energy and momentum of untracked partners: detachment fragments, the ion recoil in electron-impact ionization, the recoils in beam ionization, the binding energies in stripping.
  • Gas depletion and heating: the consumed neutrals are reported, nothing is solved for the gas.
  • In the Boltzmann solver: multi-term corrections, time dependence, electron-electron collisions, the continuous approximation for rotations (rotational levels are taken one by one), and superelastic collisions in the Monte Carlo collisions.
  • Vibrational kinetics: the populations are a prescribed Boltzmann distribution.
  • Data: the beam-gas placeholders, deuterium from hydrogen at equal speed, the capture fit above 200 keV, Park’s momentum transfer above a few hundred eV, Lotz without the deeper subshells.

Besides the checks of the cards, the tests compare the collided fraction with (1−e−νmax⁡Δt)ν/νmax⁡(1 - e^{-\nu_{\max}\Delta t})\nu/\nu_{\max}, the relaxation of ions and electrons with closed forms of Maxwell molecules (temperature, drift velocity, Wannier’s energy), the Boltzmann solver with the Maxwellian and Druyvesteyn distributions, Reid’s and the Lucas-Saelee model gases and BOLOS, the charge-state fractions and the beam markers with each other, and the fits with the values printed in their sources.