Download User guide for GADGET-2
Transcript
V. Springel 8 Differences between GADGET-1 and GADGET-2 8.1 Architectural changes There have been many major changes in the internal workings between GADGET-1 and GADGET2, affecting nearly all parts of the code. In fact, basically all parts of the code have been completely rewritten, or were revised substantially. These modifications were done to improve the accuracy and the performance of the code, to reduce its memory consumption, and to make it applicable to a wider range of types of simulations. Detailed explanations of the reasoning behind each of these modifications is beyond the scope of this short set of notes. This information can be found in the code paper on GADGET-2. However, below, I give a very brief summary of some of the most important changes in code design. 1. The internal organisation of the time integration has been changed substantially. The timestep of a particle is now usually restricted (again) to be a power of 2 subdivision of the total time span that is simulated. (It is however also possible to run the code with a more flexible timestep hierarchy.) The integration proceeds then as an alternation between ‘drift’ and ‘kick’ operations, with the leapfrog being a kick-drift-kick scheme now, instead of a drift-kick-drift. There is no explicit prediction step any more, since this part has been absorbed into the drift operation. 2. The quadrupole moments in the gravitational tree have been dropped, i.e. the new tree has only monopole moments. To achieve the same force accuracy, this generally means that more cell-particle interactions have to be evaluated. However, because each interaction is relatively simple, this effect is largely offset by the increased performance of the treewalk in terms of interactions per second. This has become possible because the monopole interactions are ‘simpler’ than the quadrupole ones, and in addition, the cache utilisation in the tree walk has been improved. The net result is that the new gravitational code is faster than the old one at the same accuracy. The ultimate reason for dropping the quadrupole moments has however been that this simplifies the dynamic update (‘drift’) of the tree. This is now done fully consistently, i.e. the tree accuracy does not degrade when the tree has not been updated for a while. (In the old code, the change of the quadrupole moments had been neglected. Also, in the Ewald correction their contribution was neglected.) 3. For cosmological integrations, the integration variables have been changed: The velocity √ variable is now taken to be u = a2 ẋ, and not w = aẋ as before. This was adopted because then the equation of motion for u does not depend on u any more, and only then can the leapfrog be formulated in a symplectic way, which allows the Hamiltonian structure of the system to be preserved. (Note however that the velocities in the snapshot and initial conditions files are still in terms of w in order to have backwards compatability with GADGET-1.) 4. SPH is implemented using the conservative ‘entropy formulation’ by default. 40