Re: Entropy IO

From: Volker Springel <volker_at_MPA-Garching.MPG.DE>
Date: Wed, 21 Jan 2009 18:55:12 +0100

Yves Revaz wrote:
> Dear Gadget List,
>
> In Gadget-2, when a snapshot is written,
> velocities have to be synchronized with the positions.
> This is done in io.c by first computing dt_gravkick and
> then extrapolating using the accelerations.
>
> fp[k] = P[pindex].Vel[k] + P[pindex].GravAccel[k] * dt_gravkick;
> if(P[pindex].Type == 0)
> fp[k] += SphP[pindex].HydroAccel[k] * dt_hydrokick;
>
> I expected to find the same synchronization for the entropy, something like
>
> SphP[i].Entropy + SphP[i].DtEntropy * dt_entr;
>
>
> However this is not present. Maybe I'm missing something.
> Thanks for your replies,
>
> yves
>
>
>

Hi Yves,

in principle this could be done, yes. However, it would also require similar
first order predictions for density, hsml, etc. The temperature that is actually
stored would then depend on predicted values for entropy and density, and
especially the latter estimate may scatter away from the true density at the
output time. As a result, there could be temperatures in the output file that
scatter potentially far away from the temperatures actually used in the proper
timestepping of the code. I had therefore opted not to try to store predicted
values for these hydrodynamical quantities, but rather use the values from the
last completed timestep. Depending on the type of simulation this may not always
be the optimal solution though... In general it would be best to synchronize the
output times with the timestepping to avoid these type of issues.

Volker
Received on 2009-01-21 18:55:13

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