Skip to content

Two-Stream Phase-Space Viewer

Learning goal

Watch the two-stream instability do the whole thing: two smooth counter-streaming beams develop ripples, the ripples grow exponentially at the rate linear theory predicts, and then they roll up into cat's-eye vortices and thermalise. This is the capstone of the course, and it is running in your browser.

A genuine 1-D electrostatic PIC code: CIC deposition, a spectral Poisson solve, and a leapfrog push, on a fixed ion background. Units have \(\omega_{pe} = 1\) and the box is one period, so the mode number is \(k\).

Things to try

  1. Let it run from the default. Three phases, clearly separated on the log plot: a brief transient, a straight exponential section, and saturation. The dashed amber line is the cold-fluid growth rate for your chosen \(k\) — not a fit, a prediction.

  2. Watch phase space rather than the graph. Early on the beams look like two flat lines with a ripple. As the field grows, the ripple deepens until particles at the resonant velocity get trapped and the beams roll into vortices. Those cat's eyes are the nonlinear saturation mechanism: once particles are trapped they stop giving energy to the wave.

  3. Change the mode number. \(k=1\), 2 and 3 grow at different rates. Cold theory gives instability only for \(kv_0 < 1\), with the fastest growth at $\(kv_0 = \frac{\sqrt3}{2\sqrt2} \approx 0.612, \qquad \gamma_{\max} = \frac{1}{2\sqrt2} \approx 0.354\,\omega_{pe}\)$ Pick \(v_0\) and \(k\) so their product lands near 0.61 and you get the most violent growth; push \(kv_0\) past 1 and it goes stable. The readout shows both the theory for your \(k\) and the fastest mode available.

  4. Note that \(\gamma_{\max}\) does not depend on \(v_0\). Only the wavenumber at which it occurs does, as \(1/v_0\). Faster beams do not grow faster; they grow at shorter wavelength.

  5. Add thermal spread. A little is harmless. Enough — comparable to the beam separation — and the instability weakens and dies: the beams overlap in velocity space, the bump in the distribution flattens, and there is no longer a population inversion to drive growth. This is the bridge to Landau damping, where the sign of \(\partial f_0/\partial v\) at the resonant velocity decides growth versus damping.

  6. Reduce the particle count to 4k. The growth rate gets noisier and the early phase is contaminated: with fewer markers the instability starts from a larger statistical seed. This is PIC noise in action, and it is why any published growth rate must be shown to be independent of \(N\).

What it is checked against

Check Result
\(\gamma_{\max} = 1/2\sqrt2\) at \(kv_0 = \sqrt3/2\sqrt2\) exact to 0.06%
\(\gamma_{\max}\) independent of \(v_0\); \(k_{\max}v_0\) constant confirmed at \(v_0\) = 0.7, 1.5, 2.5
instability boundary at \(kv_0 = 1\) confirmed either side
PIC growth rate vs cold theory within 20%
solved field has zero mean (neutrality) \(10^{-20}\)
growth saturates rather than running away confirmed

The 20% gap between PIC and cold theory is expected and worth understanding: the theory assumes cold, infinitely thin beams and an infinitesimal perturbation, while the simulation has finite particle number, a finite seed, and a grid. Agreement to 20% on a growth rate from a browser-scale run is a good result — but it is the kind of number you would need to converge properly before publishing, by scanning \(N\), \(\Delta t\) and grid size.

The dispersion relation being tested

For two cold beams of density \(n_0/2\) at \(\pm v_0\):

\[1 = \frac{\omega_{pe}^2}{2}\left[\frac{1}{(\omega - kv_0)^2} + \frac{1}{(\omega + kv_0)^2}\right]\]

Clearing denominators gives a quadratic in \(\omega^2\):

\[\omega^4 - (2k^2v_0^2 + \omega_{pe}^2)\,\omega^2 + (k^4v_0^4 - k^2v_0^2\omega_{pe}^2) = 0\]

whose lower root goes negative — i.e. \(\omega\) becomes imaginary, i.e. growth — precisely when \(kv_0 < \omega_{pe}\). Free energy in the relative streaming is converted into electrostatic wave energy, and the beams pay for it by heating.

Two-stream instability · PIC method · Leapfrog · Poisson solvers · Streaming instability (PC368) · Landau damping (PC368) · How PIC lies (PHY653B)