3D Electromagnetic Plasma

Thousands of charges gyrate along field lines in a magnetic bottle, bouncing off the pinched ends or escaping through the loss cone.

Loading plasma (WebGL 2.0)

Illustrative charged-particle model: a direct pair sum of Plummer-softened Coulomb forces (softening 0.3, cutoff r < 10, code units) in a static magnetic bottle, advanced with the Boris pusher. It is not a particle-in-cell code and not a validated plasma simulation.

Coulomb Force

F = q1 q2 r / (r^2 + eps^2)^(3/2), eps = 0.3, truncated at r = 10 with a shifted potential

Lorentz Force

F = q(E + v x B), integrated with the Boris pusher (exact |v| under pure B)

Energy Check

Total energy (kinetic + pair potential) is recomputed exactly every 30 frames and shown relative to t=0. Frame rate and physics time are measured live in your browser.

Magnetic Bottle Confinement

The field is B_z = B0 (1 + (z/L)^2) with the matching radial component, so field lines (blue) pinch toward the ends where the field is strongest. Particles gyrate around field lines; those with enough perpendicular velocity reflect at the high-field ends (magnetic mirror), the rest escape through the loss cone.

Try Different Presets

  • Magnetic Bottle: quasi-neutral ion-electron mix (mass ratio 100)
  • Aurora Beam: quasi-neutral beam streaming down the field lines
  • Counter-Drifting Species: two opposite charges drifting through each other
  • Two-Stream: opposing streams; with a few thousand softened particles this is a qualitative picture, not a resolved instability growth rate