Wave 27: Quantum Tunnelling, Fluid Vorticity & Game Theory

Wave 27 spans three disciplines in one release: the quantum world (exact transfer-matrix tunnelling through potential barriers), classical fluid mechanics (Kelvin–Helmholtz instability via Biot–Savart vortex sheets), and evolutionary social dynamics (spatial Prisoner’s Dilemma). The platform now counts 461 simulations.

Platform Stats

461Simulations
75Categories
47Devlogs
27Waves
EN+UKAll pages

Wave 27 at a Glance

This wave deliberately crosses disciplinary boundaries. Quantum tunnelling is a core topic in modern physics with profound technological applications. Kelvin–Helmholtz instability is the archetype of hydrodynamic shear instability, relevant from kitchen chemistry to stellar astrophysics. And evolutionary game theory is the mathematical language of strategic interaction, cooperation, and the emergence of social norms.

New Simulation: Quantum Tunnelling

⛛️ Quantum Tunnelling — Schrödinger Equation & T(E)

A quantum particle incident on a classically forbidden potential barrier has a nonzero probability of being found on the other side. This simulation solves the 1D time-independent Schrödinger equation exactly using the transfer matrix method (TMM), computing the transmission coefficient T(E) and the full wavefunction |ψ|² profile across the barrier in real time as sliders are moved.

Three modes

  • Square Barrier — the canonical case with exponential decay inside
  • Double Barrier — resonant tunnelling: T = 1 at discrete energies (basis of the tunnel diode)
  • Step Potential — quantum reflection even above the step

Transfer Matrix Method

For each piecewise-constant region of potential Vi and width di, the wavefunction is ψi(x) = Ai eikix + Bi e−ikix where ki = √(2m(E−Vi)/ℏ²) (real if E > Vi, imaginary for tunnelling). Boundary conditions (continuity of ψ and ψ′) at each interface are encoded as a 2×2 matrix. The total transfer matrix M = MN … M1 gives t = 1/M00 and r = M10/M00.

For a single square barrier (E < V₀):
T = [1 + V₀² sinh²(κd) / (4E(V₀−E))]⁻¹

κ = √(2m(V₀−E)) / ℏ [barrier decay rate, nm⁻¹]

WKB approximation: T ≈ exp(−2κd)

Resonant tunnelling (double barrier) condition:
k·L = nπ (n = 1, 2, …) where L = gap width

The T(E) curve panel scans 400 energy points from 0 to 2V0 on every parameter change. For the double-barrier case, resonance peaks (T = 1) are visible at the discrete eigenvalues of the quantum well formed between the two barriers — the same physics that makes resonant tunnelling diodes (RTDs) work.

Schrödinger eq.transfer matrix T(E)WKB double barrierresonant tunnelling

New Simulation: Fluid Vorticity & Kelvin–Helmholtz Instability

🌊 Fluid Vorticity & Kelvin–Helmholtz Instability

Place N point vortices in a line along a shear interface and watch them roll up into characteristic spirals — the Kelvin–Helmholtz (KH) instability. This is one of the most universal phenomena in fluid dynamics: the same curling mechanism creates cloud billows, ocean mixing layers, solar corona jets, and the boundary turbulence in accretion discs around black holes.

Physics: Biot–Savart for Point Vortices

A continuous vortex sheet of surface vorticity ω(x) is approximated by N discrete point vortices of circulation Γ. The induced velocity at vortex i from all other vortices j follows the 2D Biot–Savart law (regularised with a finite core ε to prevent numerical blow-up at close encounters):

u_x(i) = −Σ_j Γ_j · (y_i − y_j) / (2π · r²_ij) where r²_ij = |r_i − r_j|² + ε²
u_y(i) = +Σ_j Γ_j · (x_i − x_j) / (2π · r²_ij)

Linear stability: perturbation of wavenumber k grows as e^{σt}
σ = |Γ| · k / (4π) [Kaden–Birkhoff growth rate]

Periodic boundary: vortex images at x ± L, ±2L, ±3L summed for periodicity

The integration uses a forward Euler scheme (tuneable step dt). Each animation frame advances 3 substeps for smooth visual rollup. Vortex trails (45-frame ring buffer) trace the Lagrangian paths, making the spiral rollup visually striking. A sparse velocity-field overlay (redrawn every 3 frames) shows the induced flow pattern.

Three initial conditions

  • Single layer — N positive vortices along y = 0.5 with sinusoidal + random perturbation → classic KH rollup
  • Double layer — counter-rotating row above → Kármán vortex street
  • Random vortices — chaotic mix of ±Γ vortices → turbulent-like interaction
Kelvin–Helmholtzvortex sheet Biot–Savartshear instability point vortexKármán street

New Simulation: Evolutionary Game Theory

🤝 Evolutionary Game Theory — Prisoner’s Dilemma

A spatial evolutionary simulation of the iterated Prisoner’s Dilemma on a 2D grid. Each cell adopts one of five strategies — ALL-D (always defect), ALL-C (always cooperate), Tit-for-Tat (TFT), Grim Trigger (GRIM), and RAND — and competes with its eight neighbours. After each generation, every cell copies the strategy of its most successful neighbour. Mutation introduces random strategy switches.

Payoff matrix (standard Prisoner’s Dilemma)

R (both cooperate) = 3 T (temptation to defect) = 5
P (both defect) = 1 S (sucker's payoff) = 0

Condition: T > R > P > S (standard PD ordering)
Nash equilibrium: (ALL-D, ALL-D) [mutual defection]
Evolutionary stable: TFT can invade and hold against ALL-D in spatial games

The spatial structure is crucial: in a well-mixed population ALL-D always wins. But on a lattice, TFT and GRIM clusters can resist invasion by forming cooperative blocks where defectors are punished by neighbours. This is Nowak & May’s 1992 finding (Nature 359:826) that spatial structure alone can sustain cooperation without kin selection or repeated interaction at the population level.

Prisoner's dilemmaTit-for-Tat Nash equilibriumevolutionary stability Nowak–May 1992spatial games

Engineering Notes

Transfer matrix: complex arithmetic in vanilla JS

The TMM requires multiplying 2×2 matrices with complex entries, including regions where k = iκ is purely imaginary (exponential decay inside the barrier). Rather than importing a complex-number library, all operations are inlined as plain two-component structs {re, im} with explicit multiply/add helpers. The 400-point T(E) scan completes in under 4 ms on typical hardware, making it fast enough to trigger on every slider event without debouncing.

Vortex sheet: periodic Biot–Savart

For the periodic-boundary vortex sheet, the naive O(N²) sum over all pairs already covers 7 periodic images (k = −3…+3 in x). With N = 32 this is 32 × 31 × 7 = 6944 evaluations per substep, well within the frame budget. The Float64Array representation keeps memory access cache-friendly and avoids JavaScript object overhead in the inner loop.

Game theory grid: typed arrays on full-screen canvas

The evolutionary grid uses two Uint8Array buffers (current and next generation) and swaps them each frame. The grid resolution is computed from the canvas size at initialisation (CELL = 10 px), resulting in roughly 120 × 65 = 7800 cells on a typical desktop. Each cell evaluates payoffs against all 8 neighbours in ~8 additions per round, giving O(N × rounds_per_gen) complexity — fast enough for smooth 60 fps animation even at maximum slider settings.

What’s Next — Wave 28 Preview

Planned topics for Wave 28 include:

All Wave 28 simulations will ship with EN + UK pages on launch day.