The browser shows the intuition.
The Lab shows the numbers.

Physim Lab is a free, open-source desktop framework that runs the same physics you play with on this site — at research fidelity. Symplectic integrators, adaptive step control, energy-drift diagnostics, and exact analytic cross-checks. One scenario file, two worlds.

🌐 physim.ioplay, build intuition,
tweak sliders
— .physim scenario file →← shareable deep link —
🧪 Physim Labverify, measure,
publish-quality numbers

Why a desktop lab?

Browser sims are tuned for 60 fps. The Lab is tuned for truth — every model ships with a verification suite you can run yourself.

🛡️
Symplectic long-term stability

N-body gravity uses velocity-Verlet: energy drift stays bounded forever instead of accumulating.

figure-8 orbit: ΔE/E ≈ 2×10⁻¹⁴ per period
📐
Exact analytic cross-checks

Pendulum periods vs the AGM elliptic integral. Tunnelling vs the square-barrier formula. Ranges vs closed forms.

period error ≈ 10⁻¹² at θ₀ = 170°
🌪️
Chaos, quantified

Largest Lyapunov exponents via Benettin renormalisation — not just pretty trajectories.

Lorenz λ₁ = 0.906 (literature: 0.9056)
⚛️
Quantum without compromise

Split-step FFT Schrödinger evolution conserves the wavefunction norm to machine precision.

norm drift < 10⁻¹⁰ over full runs
🧊
Wolff cluster Monte Carlo

The 2D Ising model with cluster updates — no critical slowing down near T_c, plus Binder cumulants and susceptibility.

Onsager T_c = 2.2692 reproduced
21 physics-accuracy tests

RK4 measured at 4th order. Kepler energy bounded over 50 orbits. Run pytest and see for yourself.

python3 -m pytest tests/ → 21 passed

Install on macOS

Python ≥ 3.9, only NumPy + Matplotlib as dependencies. Linux works identically.

# install
$ git clone https://github.com/alfonsopuicercus/physim.git
$ cd physim/physim-lab
$ python3 -m pip install -e .

# explore
$ physim list          # 8 flagship models
$ physim gui pendulum  # sliders + live diagnostics
$ physim bench nbody   # verification report
$ physim bench pendulum
━━ Physim Lab verification: pendulum ━━

θ₀= 10°  T_exact=2.009893s  rel.err=1.96e-12
θ₀= 60°  T_exact=2.152875s  rel.err=1.45e-12
θ₀=120°  T_exact=2.754090s  rel.err=1.29e-12
θ₀=170°  T_exact=4.893524s  rel.err=8.81e-13
         +143.9% vs small-angle formula

The web ↔ lab loop

A .physim file is plain, versioned JSON — readable by humans, the website, and the Lab.

Tweak a simulation on the website

Set up the exact situation you care about — launch angle, barrier height, lattice temperature.

Click 🧪 Open in Lab

Supported sims export a .physim scenario capturing your slider state. Eight models supported: projectile, pendulum, double pendulum, N-body, Lorenz, Schrödinger, Ising, coupled oscillators.

Run it at full fidelity

physim run scene.physim — adaptive integration, energy bookkeeping, analytic comparisons printed as diagnostics. Or physim gui scene.physim for sliders.

Send it back to the browser

physim share scene.physim prints a deep link — opening it sets this site's sliders to your Lab scenario. Send it to a friend, a student, a colleague.

The 8 flagship models

Each one pairs with a web simulation — and goes far beyond it.

modelWhat the Lab adds over the web sim
projectileQuadratic drag with physical C_d / air density / area, wind, adaptive Dormand–Prince 5(4)
pendulumExact large-angle period via AGM elliptic integral; damping & periodic drive — the route to chaos
double_pendulumEnergy-drift monitoring, twin-trajectory Lyapunov estimation
nbodySymplectic velocity-Verlet, arbitrary body lists, choreography periodicity checks
lorenzLargest Lyapunov exponent via Benettin renormalisation
schrodingerSplit-step FFT, norm conserved to machine precision, T measured vs analytic barrier formula
isingWolff cluster algorithm, Binder cumulant, susceptibility, Onsager T_c
coupledN-mass chains, exact normal-mode frequencies, FFT mode decomposition