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.
0.6774^(1/3) = 0.88
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.