I have downloaded TNG100-2-Dark. I wanted to calculate the potential energy of each halo above 10^10 solar masses. I read the individual potential of each particle, and summed them up to calculate the final potential. For some halos, I got positive potential for every particle. I wonder how it could be that some halos have negative potential energy, while others have positive potential energy. Is there an error in the data? Did they use the absolute value of potential energy sometimes and other times not the absolute value? Thank you for your time.

-Noah Katz

Dylan Nelson

29 Jul '20

Hi Noah,

Perhaps some are central halos, while others are satellites?

Note that the Potential field is a bit complex. This isn't a local (per subhalo) quantity, but rather the "global" potential accounting for all mass in the simulation.

Noah Katz

30 Jul '20

"Does this mean that the potential is calculated with respect to the computational box and not with

I need to compute the potential of gas particles in the mini snapshots. However, when comparing my values with the ones in the full snapshots, I’m finding substantial differences.

Given a discrete mass distribution in a sub-halo, for each i-th particle of mass Mi_X in the distribution (where X can be ‘dark matter’, ‘gas’, ‘stars’, ‘BH’) with coordinate (xi, yi, zi), I’m calculating its contribution to the potential V at the position P with coordinates (xP yP, zP) as

Putting everything together, the potential V(P) at the position P for a discrete distribution of mass particles in a sub-halo will be:

V(P) = SUM(Vi(P)).

Since G is in cgs units (6.6743*1e-8 cm^3 g^-1 s^-2), the masses are in 10^10 Msun/h, and the distances are in comoving units/h, to have the potential in cgs units I’m doing

where aGrowth is the scale factor (i.e 1 at redshift 0 and 0.5 at redshift 1).

If now I compare my values with those given in the full snapshots I’m getting differences. For example, a gas particle at 8.54 ckpc/h from the centre of the sub-halo 50_1 feels a potential of -5788188 [km^2 s^-2], which should correspond to -5788188 [1e10 cm^2 s^-2], am I right? However, for the same position, I’m obtaining -322452.37 [1e10 cm^2 s^-2], a factor around 1/18th.

Could you have any hint about what I’m doing wrong here?

Dylan Nelson

4 Aug '20

Hi Salvatore,

I suspect the difference is between your "local" calculation and the "global" calculation done by the code, to compute the gravitational force, accounting for all mass in the simulation (not just in that subhalo).

Is the difference between your value and the snapshot value roughly the same for all particles in the subhalo? (e.g. a ~ constant offset)?

Oh, I see! Thanks.
For all the particles in the sub-halo I’m getting roughly the same difference between mine and tabulated potential.

So, if I want to analyse variations with the redshift of the potential within the same sub-halo, I could ignore the contribution from the “global” mass distribution, am I correct?

Dylan Nelson

4 Aug '20

Hi Salvatore,

Yes that's right, it is a larger-scale contribution and thus should be (may be) roughly uniform over the extent of a subhalo

I have downloaded TNG100-2-Dark. I wanted to calculate the potential energy of each halo above 10^10 solar masses. I read the individual potential of each particle, and summed them up to calculate the final potential. For some halos, I got positive potential for every particle. I wonder how it could be that some halos have negative potential energy, while others have positive potential energy. Is there an error in the data? Did they use the absolute value of potential energy sometimes and other times not the absolute value? Thank you for your time.

-Noah Katz

Hi Noah,

Perhaps some are central halos, while others are satellites?

Note that the

`Potential`

field is a bit complex. This isn't a local (per subhalo) quantity, but rather the "global" potential accounting for all mass in the simulation."Does this mean that the potential is calculated with respect to the computational box and not with

respect to the dark matter halo?"

That's true.

Hi,

I need to compute the potential of gas particles in the mini snapshots. However, when comparing my values with the ones in the full snapshots, I’m finding substantial differences.

Given a discrete mass distribution in a sub-halo, for each i-th particle of mass Mi_X in the distribution (where X can be ‘dark matter’, ‘gas’, ‘stars’, ‘BH’) with coordinate (xi, yi, zi), I’m calculating its contribution to the potential V at the position P with coordinates (xP yP, zP) as

Vi(P) = - G * (Mi_X/Ri),

where

Ri = SQRT( (xP-xi)^2 + (yP-yi)^2 + (zP-zi)^2 ),

and, following the thread in https://www.illustris-project.org/data/forum/topic/85/distance-calculation-and-periodic-boundary-conditi for taking into account the periodic boundary conditions:

if Dxi>75000/2:

else if Dxi< -75000/2:

where Dxi=xP-xi (and then the same for y and z).

Putting everything together, the potential V(P) at the position P for a discrete distribution of mass particles in a sub-halo will be:

V(P) = SUM(Vi(P)).

Since G is in cgs units (6.6743*1e-8 cm^3 g^-1 s^-2), the masses are in 10^10 Msun/h, and the distances are in comoving units/h, to have the potential in cgs units I’m doing

V(P) [10^10 cm^2 s^-2] = V(P)

(1.991e33 [g/Msun]) / (3.091e21aGrowth [cm/kpc]),where aGrowth is the scale factor (i.e 1 at redshift 0 and 0.5 at redshift 1).

If now I compare my values with those given in the full snapshots I’m getting differences. For example, a gas particle at 8.54 ckpc/h from the centre of the sub-halo 50_1 feels a potential of -5788188 [km^2 s^-2], which should correspond to -5788188 [1e10 cm^2 s^-2], am I right? However, for the same position, I’m obtaining -322452.37 [1e10 cm^2 s^-2], a factor around 1/18th.

Could you have any hint about what I’m doing wrong here?

Hi Salvatore,

I suspect the difference is between your "local" calculation and the "global" calculation done by the code, to compute the gravitational force, accounting for all mass in the simulation (not just in that subhalo).

Is the difference between your value and the snapshot value roughly the same for all particles in the subhalo? (e.g. a ~ constant offset)?

Oh, I see! Thanks.

For all the particles in the sub-halo I’m getting roughly the same difference between mine and tabulated potential.

So, if I want to analyse variations with the redshift of the potential within the same sub-halo, I could ignore the contribution from the “global” mass distribution, am I correct?

Hi Salvatore,

Yes that's right, it is a larger-scale contribution and thus should be (may be) roughly uniform over the extent of a subhalo