Expand description
Charged particle dynamics — Lorentz force, Boris pusher, cyclotron motion, drift velocities, magnetic mirrors, and particle tracing.
Structs§
- Charged
Particle - Charged
Particle System - Manages a collection of charged particles with field evaluation.
- Curvature
Drift - Curvature drift: v_curv = (m * v_parallel^2) / (q * R_c^2 * B) * (R_c × B)
- ExBDrift
- E×B drift velocity: v_drift = (E × B) / B^2 Independent of charge and mass.
- GradB
Drift - Gradient-B drift: v_grad = (m * v_perp^2) / (2qB^3) * (B × ∇B)
- Magnetic
Mirror - Magnetic mirror: confinement between two high-field regions.
- Particle
Tracer - Traces particle trajectories and renders as glyph trails.
Functions§
- boris_
push - Boris algorithm for advancing a charged particle in EM fields. This is the standard velocity-Verlet-like scheme that exactly conserves energy in a pure magnetic field.
- cyclotron_
frequency - Cyclotron frequency: omega_c = |q|*B / m
- cyclotron_
radius - Cyclotron (Larmor) radius: r_L = m*v_perp / (|q|*B)
- lorentz_
force - Lorentz force: F = q(E + v × B)
- step_
particle - Advance a particle one step in given E and B fields.