Running Simulations
Initial Conditions
The distribution function
Example:
The Hernquist model
(from
Hernquist 1990, ApJ, 356, 359
)
Monte Carlo sampling a distribution function
Initializing an exponential disk -- radial distribution
initializing a uniform disk -- the bad thing that happens when you sample evenly in r
initializing a uniform disk -- the good thing that happens when you sample evenly in r
2
(i.e., area)
monte carlo rejecting to make an exponential disk
the sm code that did this
Initializing an exponential disk -- thickness
Initializing velocity dispersions
Running the Simulation
Integrating the orbit -- the simplest (but not best) way
Leapfrog integrators
Runge-Kutta integrators
Choosing a timestep I
Choosing a timestep II
Choosing a timestep III
Quality Control