- Mail actions: [ respond to this message ] [ mail a new topic ]
- Contemporary messages sorted: [ by date ] [ by thread ] [ by subject ] [ by author ] [ by messages with attachments ]

From: Volker Springel <vspringel_at_MPA-Garching.MPG.DE>

Date: Mon, 3 May 2021 10:49:14 +0200

Hi Xiaolong,

No, at present I have no plan to include these correction terms myself in gadget4, but you or others are of course welcome to do this.

The formalism of Iannuzzi and Dolag is elegant and seems in principle the way to go. Thus I have used this off an on over the years myself. However, in practice, I think it is not clear whether the correction terms actually are worthwhile, or whether they end up doing more harm than good. For collisionless dynamics, the correction force is a spurious small scale force that varies very rapidly in time (due to the high encounter speed of particles). Normal N-body solvers do not integrate this accurately in time, such that one mostly ends up with a further noise term in the particle orbits. For hydrodynamics, the correction terms mostly matter in highly dissipative situations (e.g. fragmentation), and here total energy is anyway not conserved. They may still make a small difference, but it has been pretty subtle in my experience. Still, in this regime they are probably more relevant than for collisionless dark matter or stars. In the present version of Gadget4, the softening lengths are discretized, so a practi

cal implementation of the correction terms would pose some problems and one would have to go back to allow arbitrary softening lengths.

Regards,

Volker

*> On 3. May 2021, at 00:24, Xiaolong Du <xdu_at_carnegiescience.edu> wrote:
*

*>
*

*>
*

*> Dear Volker,
*

*>
*

*> Thank you very much for fixing this issue. I ran one test with the update. Now it runs fine.
*

*>
*

*> But I have one related question. When ADAPTIVE_HYDRO_SOFTENING is used, we usually expect that the energy will not be well conserved because the softening length may change with time. I found one paper by Iannuzzi and Dolag discussing this problem
*

*>
*

*> https://arxiv.org/abs/1107.2942
*

*>
*

*> (see Fig. 2 and Eq. 8)
*

*>
*

*> They proposed to add a correction term (Eq. 8) to the gravitational acceleration similar to what one usually does for the hydro acceleration. Is there any plan that this correction will be included in a future version of Gadget?
*

*>
*

*> Best,
*

*> Xiaolong
*

*>
*

*>> On May 1, 2021, at 5:26 AM, Volker Springel <vspringel_at_MPA-Garching.MPG.DE> wrote:
*

*>>
*

*>>
*

*>> Dear Xiaolong,
*

*>>
*

*>> Thanks for pointing this out and your clear description of the problem. I agree, the option ADAPTIVE_HYDRO_SOFTENING wasn't working properly because a call of get_softeningtype_for_hydro_particle() for updating the softening class of a particle when its Hsml has changed (in src/sph/density.cc) was lost in a botched clean-up operation of the code. Now readded - let us now if this still gives trouble.
*

*>>
*

*>> Best regards,
*

*>> Volker
*

*>>
*

*>>> On 26. Apr 2021, at 16:32, Xiaolong Du <xdu_at_carnegiescience.edu> wrote:
*

*>>>
*

*>>>
*

*>>> Dear list members,
*

*>>>
*

*>>> Recently I ran one SPH simulation with the ADAPTIVE_HYDRO_SOFTENING option. It is said in the documentation that this will make Gadget set the gravitational softening length of gas particles based on their SPH smoothing length. Accordingly, the softening values specified in the parameter file for softening type 0 will be ignored. However, I found that it did not seem to work as it is said. For example, if I simply set
*

*>>>
*

*>>> SofteningComovingClass0 = 0
*

*>>>
*

*>>> I will get the following error:
*

*>>>
*

*>>> Code termination on task=5, function gravity_fmm(), file src/fmm/fmm.cc, line 1703: Particle with ID=144105 of type=0 and softening type=0 was assigned zero softening.
*

*>>>
*

*>>> Setting a non-zero value for the above parameter gets rid of the error, but then the results seem to depend on the values of SofteningComovingClass0 in the parameter file, which should not be the case.
*

*>>>
*

*>>> Digging into the source code a bit, I found that the adaptive softening length is calculated by the function get_softeningtype_for_hydro_particle in the file src/data/simparticles.h. But this function is actually never called at any other places. So I am just guessing that even in the case with ADAPTIVE_HYDRO_SOFTENING on, the softening length of gas particle is still set by the parameter SofteningComovingClass0.
*

*>>>
*

*>>> Best regards,
*

*>>> Xiaolong Du
*

*>>>
*

*>>>
*

*>>>
*

*>>>
*

*>>> -----------------------------------------------------------
*

*>>>
*

*>>> If you wish to unsubscribe from this mailing, send mail to
*

*>>> minimalist_at_MPA-Garching.MPG.de with a subject of: unsubscribe gadget-list
*

*>>> A web-archive of this mailing list is available here:
*

*>>> http://www.mpa-garching.mpg.de/gadget/gadget-list
*

*>>
*

*>>
*

*>>
*

*>>
*

*>> -----------------------------------------------------------
*

*>>
*

*>> If you wish to unsubscribe from this mailing, send mail to
*

*>> minimalist_at_MPA-Garching.MPG.de with a subject of: unsubscribe gadget-list
*

*>> A web-archive of this mailing list is available here:
*

*>> http://www.mpa-garching.mpg.de/gadget/gadget-list
*

*>
*

*>
*

*>
*

*>
*

*> -----------------------------------------------------------
*

*>
*

*> If you wish to unsubscribe from this mailing, send mail to
*

*> minimalist_at_MPA-Garching.MPG.de with a subject of: unsubscribe gadget-list
*

*> A web-archive of this mailing list is available here:
*

*> http://www.mpa-garching.mpg.de/gadget/gadget-list
*

Received on 2021-05-03 10:49:15

Date: Mon, 3 May 2021 10:49:14 +0200

Hi Xiaolong,

No, at present I have no plan to include these correction terms myself in gadget4, but you or others are of course welcome to do this.

The formalism of Iannuzzi and Dolag is elegant and seems in principle the way to go. Thus I have used this off an on over the years myself. However, in practice, I think it is not clear whether the correction terms actually are worthwhile, or whether they end up doing more harm than good. For collisionless dynamics, the correction force is a spurious small scale force that varies very rapidly in time (due to the high encounter speed of particles). Normal N-body solvers do not integrate this accurately in time, such that one mostly ends up with a further noise term in the particle orbits. For hydrodynamics, the correction terms mostly matter in highly dissipative situations (e.g. fragmentation), and here total energy is anyway not conserved. They may still make a small difference, but it has been pretty subtle in my experience. Still, in this regime they are probably more relevant than for collisionless dark matter or stars. In the present version of Gadget4, the softening lengths are discretized, so a practi

cal implementation of the correction terms would pose some problems and one would have to go back to allow arbitrary softening lengths.

Regards,

Volker

Received on 2021-05-03 10:49:15

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