Re: Linear momentum

From: Volker Springel <volker_at_MPA-Garching.MPG.DE>
Date: Mon, 19 Nov 2007 09:51:40 +0100

Anna Artigas wrote:
> Dear Gadget list,
> I am performing simulations with gas and dark matter with Gadget 2 and I have
> noticed that the linear momentum doesn't conserve. In my simulations the
> center of mass moves appreciably during the simulation.
> Does anybody have the same problem? How could I avoid this?
> Thank you,
> Anna

Hi Anna,

The tree-algorithm used by gadget provides an approximation of the
gravitational force, and there is no guarantee that the errors in the
forces all add up to give exactly zero. In other words, one cannot
expect that the total momentum is preserved exactly. (There are however
other types of tree algorithms, most notably the 'fast multipole'
method, which have this property to machine precision, see for example
the code by Walter Dehnen, 2000, ApJ, 536, L39. But this method cannot
be readily used with individual timesteps, this is the main reason why
it is not used by gadget at the moment.)

Normally, errors due to non-conservation of momentum are pretty small
and inconsequential, especially when one avoids imposing a wrong center
(say fixed at the origin) for an isolated object whose core has drifted
away from the initial coordinate. However, the initial conditions and
code parameter settings can have a large impact on the size of this
effect. It's clear that one should make sure that the initial
center-of-mass velocity is zero if one simulates an isolated object,
otherwise a drift will obviously occur. The code parameters for force
accuracy and time integration are highly important however, too. The
better the force accuracy, the smaller this error will become. So
improving the force accuracy setting should lead to a substantial
reduction of any induced motion of the center of mass. Equally important
is the time integration accuracy. If you use a too large
MaxSizeTimestep, in particular, then the finite error in the total force
will be 'amplified' with the use of a too large timestep.


> -----------------------------------------------------------
> If you wish to unsubscribe from this mailing, send mail to
> with a subject of: unsubscribe gadget-list
> A web-archive of this mailing list is available here:
Received on 2007-11-19 09:51:30

This archive was generated by hypermail 2.3.0 : 2022-09-01 14:03:42 CEST