Devlog #59 – Wave 39: Law of Large Numbers, Fusion Reactor & Molecular Spectroscopy

Wave 39 covers three disciplines rarely neighbours: probability theory, plasma physics, and physical chemistry. A running-mean convergence simulator lets you roll virtual dice thousands of times per second and watch X̄ creep toward μ with shrinking ±σ/√N bands; a tokamak model computes fusion power from the Bosch–Hale D–T reactivity and flashes an ignition alert when you push Q above 10; and a molecular spectroscopy tool renders full IR absorption spectra for five molecules via Beer–Lambert law with rotational P/R-branch fine structure. All three ship with Ukrainian translations on launch day.

Release Stats

490
Total simulations
59
Devlog entries
39
Release waves
1700
Sitemap URLs

New Simulations

📊

Law of Large Numbers

Roll dice, flip coins, or sample continuous distributions. Watch the running mean X̄ converge to the true μ in real time with animated ±σ/√N confidence bands and a live histogram.

Open simulation →
☢️

Fusion Reactor

Interactive D–T tokamak using the Bosch–Hale ⟨σv⟩(T) parametric fit. Tune plasma temperature, density, and confinement time to cross the Lawson criterion and achieve ignition (Q ≥ 10).

Open simulation →
🔬

Molecular Spectroscopy

Beer–Lambert IR absorption spectra for H₂O, CO₂, CH₄, HCl, and NH₃, with temperature-dependent P/R-branch rotational fine structure and a vibrational energy level diagram.

Open simulation →

Law of Large Numbers

The classic Bernoulli theorem — that the sample mean of i.i.d. random variables converges in probability to the population expectation μ — is one of the most important results in all of probability theory, yet it is surprisingly hard to develop intuition for from text alone.

The simulator offers eight source distributions: d6/d4/d20 dice, a fair coin, standard Gaussian, exponential (λ=1), a bimodal (±3) mixture, and a custom Bernoulli (p=0.3). Speed can be set to ×1, ×10, or ×100 samples per animation frame to show both the early-phase wild fluctuations and the eventual tight convergence. Two canvas panels run in tandem: the top shows the running mean trace against the true μ dashed line, optionally with filled ±σ/√N and ±2σ/√N bands; the bottom shows a live 30-bin histogram with a theoretical PDF overlay.

Technical details

Fusion Reactor

Nuclear fusion requires three conditions to be met simultaneously: sufficient plasma temperature T (so nuclei have enough kinetic energy to tunnel through the Coulomb barrier), sufficient density n (so collisions are frequent), and sufficient energy confinement time τE (so energy is retained long enough for self-heating to dominate). The Lawson criterion combines the latter two into a single figure of merit: nτE.

The simulator uses the Bosch–Hale (1992) parametric fit for the Maxwell-averaged D–T reactivity ⟨σv⟩(T), valid from 0.5–550 keV. Fusion power is computed as Pf = (n²/4)·⟨σv⟩·QDT·V where QDT = 17.58 MeV = 2.82×10⁻¹² J. The Q-value (fusion gain) is Pf/Pheating.

Plasma states

The animating temperature sweep scans 1–200 keV, passing through the D–T reactivity peak near 65 keV. The tokamak cross-section canvas shows glow intensity and colour shifting from blue-white (cold plasma) to red-orange (hot igniting plasma) continuously.

Molecular Spectroscopy

Infrared spectroscopy is the workhorse technique of analytical and physical chemistry: every polar chemical bond absorbs IR radiation at characteristic frequencies that match its fundamental vibrational mode. The simulator renders Beer–Lambert transmission spectra T(ν̃) = exp(−A(ν̃)) across 400–4000 cm⁻¹.

Each molecular band is modelled with a Lorentzian lineshape whose half-width is inversely coupled to the instrumental resolution slider. For diatomics (HCl) and near-diatomics with a large rotational constant B (H₂O at B = 27.88 cm⁻¹, NH₃, CH₄), the P- and R-branch structure is resolved: individual rotational lines are placed at ν̃ = ν̃0 ± 2BJ, weighted by a Boltzmann population (2J+1)·exp(−hcBJ(J+1)/kT), with J ranging up to a temperature-dependent Jmax.

Molecule presets

Technical Notes

All three simulations are self-contained single-page HTML5/CSS/JS files with zero external dependencies. The LLN convergence canvas redraws in under 2 ms at 10,000 samples; the tokamak glow uses createRadialGradient at 80 radial arc points per frame without WebGL. The spectroscopy engine pre-allocates a Float32Array(1200) absorptance buffer and evaluates each Lorentzian sweep in a single tight loop, completing a full 4000 cm⁻¹ spectrum in under 4 ms.

Tags

Probability Law of Large Numbers Bernoulli’s Theorem Convergence Statistics Plasma Physics Fusion Reactor Tokamak Lawson Criterion D-T Fusion Physical Chemistry IR Spectroscopy Beer-Lambert Rotational Fine Structure Wave 39