StarSmasher
StarSmasher is a smoothed particle hydrodynamics (SPH) code for modelling collisions and close interactions between stars and planets. It is parallelised with MPI and computes self-gravity on NVIDIA GPUs through CUDA, on Apple Silicon GPUs through Metal, or on the CPU.
The code descends from StarCrash, written by Joshua Faber, James Lombardi and Frederic Rasio, and is maintained at github.com/jalombar/starsmasher.
Where to start
Quickstart goes from a clone to a relaxed star in a handful of commands, and is the fastest way to find out whether the code builds on your machine.
Work then falls into two stages, and the tutorials follow that order. You relax a star into an SPH model, once per star, and then you collide the results. Relaxing a polytrope does the first with a polytrope, Relaxing a star with a stellar-evolution profile, and A collision does the second.
sph.input lists every setting with its default and says which initialization scripts read it. If you are looking for what a particular number in an output file means, that is Output files.
If the physics is what you are after rather than the mechanics, Equations of motion explains what StarSmasher does differently from textbook SPH and why it matters for collisions.
Getting started
Using StarSmasher
Reference