Wave 48 at a Glance
Electrolysis
Faraday's laws: m = MIt/nF. Watch H₂ and O₂ bubble from electrodes, switch between water, brine, and copper-plating presets.
Launch →Liquid Crystal
Nematic director field with Frank elastic relaxation. Fréedericksz transition switches the cell transparent above the threshold field.
Launch →Magnetic Levitation
Meissner effect: superconductor below Tc expels field lines and levitates a magnet. Force-height curve shows the stable equilibrium point.
Launch →Electrolysis — Faraday's Laws Made Visible
Electrolysis was the first quantitative evidence that matter is made of discrete charged particles — Michael Faraday published his two laws in 1832–1833 before the electron was even named. The core equation is deceptively simple:
m = M · I · t / (n · F)
where m is the mass deposited or evolved (g), M is the molar mass (g/mol), I is current (A), t is time (s), n is the number of electrons transferred per mole, and F = 96485 C/mol is the Faraday constant.
Three Preset Reactions
The simulation ships with three chemically distinct presets:
- Water (H₂SO₄ electrolyte): cathode produces H₂ (2H₂O + 2e⁻ → H₂ + 2OH⁻), anode produces O₂ (2H₂O → O₂ + 4H⁺ + 4e⁻). Decomposition voltage E° = 1.23 V; practical cell voltage 1.5–2.0 V with overpotential.
- NaCl brine (chlor-alkali process): anode produces Cl₂ (2Cl⁻ → Cl₂ + 2e⁻). E° = 1.36 V. Industrially the dominant route to NaOH and Cl₂.
- CuSO₄ (copper electroplating): Cu²⁺ + 2e⁻ → Cu(s) at cathode; Cu(s) → Cu²⁺ + 2e⁻ at anode. Equilibrium potential E° = +0.34 V — no net cell voltage needed in a truly reversible cell, but overpotential still applies in practice.
Animation Approach
The single 860×360 canvas draws a cross-section of the electrolytic cell. Animated ions (cyan for cations, pink for anions) drift from left to right representing current flow. Bubble particles spawn from each electrode surface at a rate proportional to the current, rise with a slight horizontal random walk, and vanish at the solution surface — giving an immediate visual feedback of reaction rate when you change voltage or concentration. For the copper preset, solid deposition dots form on the cathode instead of rising bubbles.
Liquid Crystal — Order Between Solid and Liquid
Liquid crystals occupy a fascinating middle ground: they flow like liquids but maintain orientational long-range order like crystals. In a nematic phase, rod-shaped molecules point preferentially along a local average direction called the director n̂. The degree of alignment is captured by the order parameter:
S = ½ ⟨3cos²θ − 1⟩
S = 1 means perfect alignment; S = 0 is the isotropic liquid above the clearing temperature Tc. The simulation uses the mean-field approximation S(T) ∝ (1 − T/Tc)^0.36.
Frank Elastic Energy and Director Relaxation
Director distortions cost energy described by the Frank elastic free energy density (one-constant approximation):
f = ½K[(∇·n̂)² + (n̂×∇×n̂)²]
On a 28×22 grid, each director angle θ is updated each frame toward the weighted average of its neighbours (a discrete Laplacian), plus a thermal noise term proportional to T/Tc, plus an electric field torque that activates above the Fréedericksz threshold. The result is a visually satisfying texture that slowly coarsens, with sharp disclination cores persisting indefinitely in the "Defects" preset.
Fréedericksz Transition and LCD Switching
The critical field is:
Ec = π√(K / ε₀Δε) / d
Below Ec the planar alignment is stable; above it, an increasing fraction of directors reorient toward the field direction. This is the operating principle of every IPS/TN LCD screen. The transmittance plot (T = sin²(πΔnd/λ) × field factor) shows how combining birefringence and field tilt makes a voltage-controlled optical shutter.
Magnetic Levitation — The Meissner Effect
In 1933, Meissner and Ochsenfeld discovered that superconductors do something more fundamental than merely having zero resistance: they actively expel all magnetic flux from their interior (B = 0), a phenomenon that cannot be explained by perfect conductivity alone. This Meissner effect is what makes passive magnetic levitation possible without any active feedback — circumventing Earnshaw's theorem, which forbids stable levitation by static fields in free space.
Levitation Force Model
The simulation uses a dipole model for the magnet field decay and an image-dipole repulsion for the Meissner force:
F(h) = A · B(h)² / (2μ₀)
where B(h) = B₀/(1 + (h/h₀)²) is the field at the superconductor surface, A is the effective cross-sectional area, and μ₀ = 4π×10⁻⁷ H/m. Three material presets cover high-temperature YBCO (Tc = 93 K, levitates in liquid nitrogen), low-temperature Nb (Tc = 9.2 K), and an active electromagnet (no Tc threshold).
Visual Design
The visualisation cross-section draws the superconductor disk with a colour gradient that shifts from deep blue (T ≪ Tc) to grey (T > Tc). Field lines are bent around the superconductor surface when active (Meissner screening), and pass through normally when the material is in the normal state. Blue upward and pink downward force arrows scale with F and mg in real time. The second canvas plots F(h) from h = 0 to 80 mm with a dashed horizontal line showing the gravitational load — the green dot marks the stable equilibrium height.
Technical Notes
Electrolysis Current Model
Current is computed as I = (V − E° − η_ohm) × A × σ(c) with a linear approximation for electrolyte conductivity. This is intentionally simplified — a full Tafel + mass-transport model would require ODE integration. The result is accurate to order-of-magnitude for educational purposes.
Director Field Performance
The 28×22 director grid runs at 60 fps with updates every
other frame. The bottleneck is the nested loop (616 iterations) with
4-neighbour stencil — fully synchronous, no web worker needed. On
slower devices the tick % 3 draw gate keeps the
canvas render from dominating CPU time.
ctx.roundRect() method used in the electrolysis
canvas requires Chrome 99+/Firefox 112+/Safari 15.4+.
The simulation falls back gracefully (no visible error) on older
browsers since roundRect calls are inside fill operations — the
corners simply appear square.
What's Next — Wave 49
With electrochemistry and soft matter now at two simulations each, Wave 49 will target the next tier of underrepresented categories. Current candidates include quantum optics (photon entanglement / Bell test), biophysics (membrane potential / Hodgkin-Huxley), and geophysics (seismic wave propagation). As always, category balance and educational value guide selection.
electrolysis Faraday's laws liquid crystal Fréedericksz transition magnetic levitation Meissner effect superconductor Wave 48