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.
Browser sims are tuned for 60 fps. The Lab is tuned for truth — every model ships with a verification suite you can run yourself.
N-body gravity uses velocity-Verlet: energy drift stays bounded forever instead of accumulating.
figure-8 orbit: ΔE/E ≈ 2×10⁻¹⁴ per periodPendulum periods vs the AGM elliptic integral. Tunnelling vs the square-barrier formula. Ranges vs closed forms.
period error ≈ 10⁻¹² at θ₀ = 170°Largest Lyapunov exponents via Benettin renormalisation — not just pretty trajectories.
Lorenz λ₁ = 0.906 (literature: 0.9056)Split-step FFT Schrödinger evolution conserves the wavefunction norm to machine precision.
norm drift < 10⁻¹⁰ over full runsThe 2D Ising model with cluster updates — no critical slowing down near T_c, plus Binder cumulants and susceptibility.
Onsager T_c = 2.2692 reproducedRK4 measured at 4th order. Kepler energy bounded over 50 orbits. Run pytest and see for yourself.
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
A .physim file is plain, versioned JSON — readable by humans, the website, and the Lab.
Set up the exact situation you care about — launch angle, barrier height, lattice temperature.
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.
physim run scene.physim — adaptive integration, energy bookkeeping, analytic comparisons printed as diagnostics. Or physim gui scene.physim for sliders.
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.
Each one pairs with a web simulation — and goes far beyond it.
| model | What the Lab adds over the web sim |
|---|---|
| projectile | Quadratic drag with physical C_d / air density / area, wind, adaptive Dormand–Prince 5(4) |
| pendulum | Exact large-angle period via AGM elliptic integral; damping & periodic drive — the route to chaos |
| double_pendulum | Energy-drift monitoring, twin-trajectory Lyapunov estimation |
| nbody | Symplectic velocity-Verlet, arbitrary body lists, choreography periodicity checks |
| lorenz | Largest Lyapunov exponent via Benettin renormalisation |
| schrodinger | Split-step FFT, norm conserved to machine precision, T measured vs analytic barrier formula |
| ising | Wolff cluster algorithm, Binder cumulant, susceptibility, Onsager T_c |
| coupled | N-mass chains, exact normal-mode frequencies, FFT mode decomposition |