Incorrect computation of Group_M_Mean200 in TNG100

Kaitlyn Linder

29 Jan '23

I used Group_R_Mean200 in TNG100, snapshot 135 to calculate what the Group_M_Mean200 should be and found that Group_M_Mean200, when compared to my calculated value was consistently only 88% of the expected value, across the entire snapshot. When I did this calculation with Group_R_Crit200, the error was not present.

Dylan Nelson

30 Jan '23

Do you mean that you went to the snapshot data, loaded the Masses of all particles/cells of all types, computed their distances, and summed up all the Masses within a radius of Group_R_Mean200, but that the resulting total mass was smaller than Group_M_Mean200?

Kaitlyn Linder

2 Feb '23

We used this code to calculate it directly.

Dylan Nelson

2 Feb '23

What are the magic numbers 2.775e11 and 0.3089?

How do you handle the unit conversion (r_200 is in code length units which are "comoving kpc/h").

Kaitlyn Linder

3 Feb '23

2.775e11 is the critical density of the universe and 0.3089 is the Omega m. For r_200, we divided it by 1000 in the code to convert from kpc/h to Mpc/h.

I do not think this is the case, as we get the expected results when we calculate the same thing (without multiplying by Omega m) for Group_R_Crit200 and Group_M_Crit200. I am also unsure what you are suggesting with the h^(1/3) factor.

I used Group_R_Mean200 in TNG100, snapshot 135 to calculate what the Group_M_Mean200 should be and found that Group_M_Mean200, when compared to my calculated value was consistently only 88% of the expected value, across the entire snapshot. When I did this calculation with Group_R_Crit200, the error was not present.

Do you mean that you went to the snapshot data, loaded the

`Masses`

of all particles/cells of all types, computed their distances, and summed up all the`Masses`

within a radius of`Group_R_Mean200`

, but that the resulting total mass was smaller than`Group_M_Mean200`

?We used this code to calculate it directly.

What are the magic numbers

`2.775e11`

and`0.3089`

?How do you handle the unit conversion (

`r_200`

is in code length units which are "comoving kpc/h").2.775e11 is the critical density of the universe and 0.3089 is the Omega m. For r_200, we divided it by 1000 in the code to convert from kpc/h to Mpc/h.

Seems like

`0.6774^(1/3) = 0.88`

might be the issue. The units of Group_R_Mean200 are`ckpc/h`

.I do not think this is the case, as we get the expected results when we calculate the same thing (without multiplying by Omega m) for Group_R_Crit200 and Group_M_Crit200. I am also unsure what you are suggesting with the h^(1/3) factor.