Skip to content
MikeBertinPublic

About

Computational physics in the browser — DLA, Ising & molecular-dynamics simulations rebuilt from my undergrad coursework

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

10 Commits

Folders and files

Repository files navigation

Chiron

Computational physics, in the browser.

Three classic simulations from my undergraduate computational-physics coursework (~2011), originally written in C with OpenGL/GLUT and now rebuilt as interactive, self-contained web apps. No build step, no dependencies, no server: every simulation runs entirely in the browser.

A fractal grows, a magnet dissolves through its critical temperature and a crystal melts, with hover-to-learn physics popovers

🔗 Live site: hover any underlined term for the physics behind it, and check each sim's Things to notice for the good quirks (frozen Ising stripes, DLA screening, supercooling).

The simulations

Diffusion-Limited Aggregation Fractal growth Random walkers stick into a branching fractal; fractal dimension (~1.71) computed live. Sticking probability, seed shapes and 4-/8-neighbour sticking are adjustable.
The Ising Model Phase transition A Metropolis Monte Carlo lattice of spins. Cross the critical temperature (T꜀ ≈ 2.269) to watch magnetic order appear and dissolve. Auto-sweep traces the magnetisation curve.
Molecular Dynamics Melting & freezing Lennard-Jones atoms integrated with the Verlet algorithm. Heat the crystal until it melts, cool the liquid until it re-freezes; atoms coloured by speed.

Why "Chiron"

Chiron was the wise centaur of Greek myth, tutor to Achilles, Jason and Asclepius: the teacher of heroes. A fitting name for a project whose whole point is teaching physics by letting you play with it. The name does double duty: 2060 Chiron is also a real astronomical object, the first of the "centaur" minor planets discovered orbiting between Saturn and Uranus.

Notes on the port

The physics is faithful to the original coursework, with a few modernisations for the web:

  • DLA implements the textbook radial walk (birth circle, jump optimisation, sticking probability) that the original's circle-spawn code intended.
  • Ising is the same Metropolis update with a periodic lattice and an energy/probability lookup table; the temperature sweep that the original wrote to disk is now a live plot.
  • MD uses a fully periodic box (the original was periodic in x only) and a velocity-rescaling thermostat with velocity Verlet, in place of the original's precomputed initial-conditions file.

Running locally

It's all static files. Open index.html, or serve the folder:

python3 -m http.server 8730

Then visit http://localhost:8730.


Part of a collection of interactive builds · mikebertin.github.io

About

Computational physics in the browser — DLA, Ising & molecular-dynamics simulations rebuilt from my undergrad coursework

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages