Release Stats
New Simulations
SVD Compression
Power-iteration SVD applied to six 64×64 test patterns (portrait, geometric, gradient, checkerboard, stripes, noise). A rank slider (1–64) controls how many singular vectors are included in the rank-k approximation A ≈ Σ σiuiviT. Below, a bar chart of all 64 singular values σ highlights the included vectors in violet.
Open SVD Compression →Z-Pinch
180 plasma particles confined in a column by the axial current’s azimuthal magnetic field (J×B pinch force). Choose Stable, Sausage (m=0) or Kink (m=1) mode and watch the instability grow from a small seed perturbation. Left panel = cross-section; right panel = axial profile showing column deformation.
Open Z-Pinch →Potential Energy Surface
Full-canvas colour render of the Müller-Brown PES with 20 white-overlay contour lines. Three minima labelled R (Reactant), P (Product), I (Intermediate) and two saddle points TS1, TS2. An Euler-integrated particle with friction γ and thermal noise kT rolls between wells, leaving a dotted trail. Click anywhere to teleport the particle.
Open PES →SVD Compression — Design Notes
Power-Iteration SVD
Rather than implementing full Golub-Reinsch SVD (prohibitively slow
in JavaScript for N=64), the simulator uses a sequential power
iteration with deflation. For each component c it
finds the dominant left singular vector of the residual matrix
R = A − Σi<c σiuiviT
via 40 iterations of alternating u = R v / ‖R v‖
and v = RTu / ‖RTu‖,
then deflates the residual. All 64 components are computed once per
image load; thereafter updating the rank slider is instant.
Statistics Panel
Four live statistics track the quality/compression trade-off:
- Rank k: number of singular vectors retained.
-
Variance captured:
Σi≤kσi2 / Σiσi2— typically >99 % by rank 20 for smooth images. -
Compression ratio:
k(m+n+1) / (mn)— values below 1 mean the SVD format uses fewer numbers than the raw pixel grid. -
Frobenius error:
‖A − Ak‖F = √(Σi>kσi2)— the Eckart-Young theorem guarantees this is the minimum possible error for any rank-k matrix.
Test Patterns
The six built-in patterns stress-test the SVD at different intrinsic ranks. The checkerboard is essentially a rank-8 signal (8 spatial frequencies), so rank=8 already gives nearly perfect reconstruction. The noise image has full rank 64 because random pixels have no redundant structure — the singular values decay slowly and you need many components to reduce the error appreciably. Smooth images like the gradient compress extremely well: rank=2 often captures >95 % of variance.
Z-Pinch — Design Notes
Physics Model
In a real Z-pinch an axial current density
Jz generates an azimuthal magnetic field
Bθ = μ0I / (2πr). The
resulting inward Lorentz force
F = J × B compresses the plasma radially.
Equilibrium is described by the Bennett relation:
I2 = 8πNkT (in Gaussian units), giving
an equilibrium radius
Req ∝ √T / I. Higher current or
lower temperature produce a tighter pinch.
Instability Modes
Two classical MHD instability modes are simulated:
-
Sausage instability (m=0): azimuthally symmetric
perturbation that squeezes the column into alternating thick and
thin sections. A narrowing increases the local field and pinch
force, amplifying the perturbation — unstable. Each of the
32 axial segments oscillates to a target radius driven by
Req(1 + ε · sin(kzz + t)). -
Kink instability (m=1): the column as a whole
bends laterally. Applied to each segment as a sinusoidal lateral
displacement
dx ∝ ε · sin(2kz + 0.7t). The growth rate is ≈ 0.6 × the sausage rate, reflecting the lower magnetic pressure gradient for the m=1 mode.
Growth rate depends on current and temperature via
γ ∝ I / (√T · Req),
so high current, low temperature plasmas are far more unstable.
Plasma β
The plasma beta β = 2μ0nkT/B2 is the ratio of thermal to magnetic pressure. A high-β plasma is thermally dominant and resists compression; a low-β plasma is magnetically dominated. The simulator reports β live, making it straightforward to see how adjusting I and T moves you across that boundary.
Potential Energy Surface — Design Notes
Müller-Brown Potential
The Müller-Brown (1979) potential is the standard benchmark PES in computational chemistry. It is a sum of four Gaussian terms:
-
V(x,y) = Σi=14 Ai exp[ai(x−x0i)2 + bi(x−x0i)(y−y0i) + ci(y−y0i)2]
with parameters (A, a, b, c, x0, y0) = (−200, −1, 0, −10, 1, 0), (−100, −1, 0, −10, 0, 0.5), (−170, −6.5, 11, −6.5, −0.5, 1.5), (15, 0.7, 0.6, 0.7, −1, 1). This yields three local minima (R, I, P) and two first-order saddle points (TS1 between R and P, TS2 between P and I).
Particle Dynamics
The particle obeys the Langevin equation:
m&ddot;x = −∇V − γ˙x + √(2kBT) · ξ(t)
where ξ is Gaussian white noise. At zero temperature and high
friction the trajectory follows the intrinsic reaction coordinate
(IRC) — the steepest-descent path from a saddle point to the
adjacent minima. At finite temperature the particle can cross
barriers with rate ∝ exp(−Ea/kT) (Arrhenius),
making spontaneous well-hopping visible for high temperature values.
Rendering
The PES colour map and contour lines are rasterised once to an offscreen canvas on page load (and whenever the barrier scale changes). The 20-level contour extraction uses a simplified horizontal marching-squares scan: for each row, horizontal edges where the potential crosses the target isoline are marked and rendered as semi-transparent white lines. The main render loop then draws just the offscreen bitmap, the special-point markers, the particle trail (dashed amber), and the particle itself — keeping the animation at a smooth 60 fps.
Technical Notes
All three simulations are self-contained single-page HTML5/CSS/JS files with zero dependencies beyond the shared navbar/footer components already in the platform. SVD computation runs synchronously on page load for a 64×64 image (64 deflation steps, each with 40 power iterations) in under 200 ms on a modern laptop. The PES offscreen render at typical viewport sizes completes in under 100 ms. Z-Pinch updates 3 physics steps per animation frame, giving smooth-looking 60 fps dynamics without overloading the main thread.
Tags
Linear Algebra SVD Image Compression Plasma Physics Z-Pinch MHD Instabilities Physical Chemistry Potential Energy Surface Reaction Dynamics Transition State Wave 37