next up previous contents
Next: Neighbor Lists Up: SPH: Smoothed Particle Hydrodynamics Previous: Derivatives in SPH   Contents


Evolving Quantities in Time

The equations of motion for SPH particles are relatively simple, since particles have well-defined positions, velocities, and accelerations. We calculate a timestep which satisfies the Courant stability conditions, picking it to be sufficiently small compared to the typical

These steps help to ensure accuracy, but we do slightly better. To increase our numerical accuracy, we use a second-order ``leapfrog'' approach during each timestep. At the beginning of a run, we advance the velocities half a timestep. In each succeeding iteration, we first advance the particles' positions half a timestep using the velocity value already calculated for mid-timestep, calculate the rate of change of the entropy at the mid-timestep if AV is being used, and then advance the particles to the end of the step. We go back, advance the velocities half an iteration with the old values of the acceleration, recalculate the accelerations (which are weakly velocity-dependent), and advance the velocities a full time-step from the old values. Essentially, this method reproduces the second order Runge-Kutta approach, while consistently updating all the other things that make the code work. Please note that we adjust everything back to a consistent reference time when producing output files.


next up previous contents
Next: Neighbor Lists Up: SPH: Smoothed Particle Hydrodynamics Previous: Derivatives in SPH   Contents
Joshua Faber 2003-06-28