This site is version 0.0.1. Most of the code on this site is drafted by an agent and needs review. I apologize for the AI-speak, we are working on rewriting it!
viv-lang.org

← Posts

demoAIPlasma physics

The bounce period of an electron trapped in a plasma wave

In the frame of a large-amplitude plasma wave, an electron near the wave's phase velocity moves like a pendulum. Released 0.1 radian from the bottom of a trough, it takes time units to bounce back, which is from the complete elliptic integral, and to six digits. Electrons with speed below at the trough stay in it; faster ones pass over the crests.

Look inside this program

  • Atlas

    The program’s map: every function and which calls which.

  • There’s no recorded run of this program yet.

Landau damping is the linear theory of a wave losing energy to the electrons that move at nearly its phase velocity. It assumes the wave is small enough that those electrons go straight through it. O'Neil (Phys. Fluids 8, 2255,

  1. asked what happens when the wave is large: the resonant electrons are

caught in its potential troughs and bounce back and forth there, and the damping stops after about one bounce. The time scale of that nonlinear stage is the bounce period, and this post computes it.

In the frame moving with the wave, the potential is static, , and an electron obeys . That is the pendulum equation. In units with it reads , and small oscillations about the bottom of a trough have the bounce frequency .

The program integrates the equation with velocity Verlet and measures the period. The references are a closed form, the complete elliptic integral , which the program computes with the arithmetic-geometric mean, and posts/refs/trapped-electron-bounce-period.py, which gets from scipy's ellipk and the period from scipy's solve_ivp without either of the program's methods.

The period at

A pendulum released from rest at angle has the period

where . For a small release angle the series gives : the period grows with amplitude because the restoring force is weaker than .

At and the elliptic integral gives , and is short by , the size of the next term. The Verlet run lands within of the elliptic value: its phase error is of a period, and the test allows twice that.

Printed

T_num: 6.28711
T_ellip: 6.28711
T_series: 6.28711
verlet_phase: 1.66667e-07

Tests 5 of 5 pass

  • the arithmetic-geometric mean gives K(1/2) = 1.854074677301372, scipy's ellipk(0.5) (passes)
  • 4 K(sin^2(0.05)) = 6.287114549310, scipy's value (passes)
  • the Verlet phase error (omega_B dt)^2 / 24 is 1.7e-7 of a period (passes)
  • the Verlet period is within twice the Verlet phase error, 2 (dt^2/24) T, of 4K (passes)
  • 2 pi (1 + theta0^2/16) = 6.287112298 is below 4K by 2.25e-6, the size of the theta0^4 term (passes)

A deeper trough bounces faster

The only frequency in the problem is , so quadrupling the wave amplitude halves the bounce period at the same release angle. The program runs with the time step halved, which keeps the same, and the period comes out half of the period to rounding.

Printed

T_strong: 3.14356

Tests 1 of 1 pass

  • at phi0 = 4 the period is half, 3.1435573, as solve_ivp finds (passes)

At large amplitude the period diverges at the separatrix

An electron released at rest near the crest, , takes longer and longer to start moving, and grows like as . The first figure puts the Verlet periods beside at six release angles; the program checks each against the elliptic integral, and the reference script checks against solve_ivp at the same angles.

Printed

T_amp: [6.38279, 6.69997, 8.34975, 10.3232, 16.1555, 21.0392]
T_k: [6.38279, 6.69998, 8.34975, 10.3232, 16.1555, 21.0392]
Bounce period against release angle, phi0 = 11015202500.511.522.53release angle theta0 (radians)bounce period ωBT
4K(sin2(θ0/2))velocity Verlet, dt = 0.002

Tests 2 of 2 pass

  • at each release angle the Verlet period matches 4K to 2e-6 relative (passes)
  • 4K at theta0 = 3.1 is 21.0392237, as solve_ivp finds (passes)

Trapped and passing electrons

The energy is conserved. An electron at the bottom of a trough () with speed reaches the crest (, where the potential energy is ) only if , that is . The curve , , is the separatrix: inside it electrons are trapped and bounce, outside they stream past the crests. The trapped band is wide in velocity, and it is the electrons in this band that O'Neil's theory follows.

The program finds the boundary without using the energy: it launches electrons from the trough, marks an electron as passing when it gets past , and bisects on . The boundary comes out at to the bisection's tolerance.

Printed

v_trap: 2
Phase space of electrons in the wave frame, phi0 = 1-202-3-2-10123x (wave phase, radians)v
orbits from the troughseparatrix v=±2ωBcos(x/2)

Tests 1 of 1 pass

  • the trapped-passing boundary at the trough is 2 omega_B = 2, to 1e-4 (passes)

Checked when the site was built: 9 of 9 tests passed, in 0.38 s. Download 2026-09-25-trapped-electron-bounce-period.viv