just a naive question. I would like to caculate the binding energy for each stellar particle (PartType4), so according to the classical definition this is E = U + v^2. As regards to the data specification I should just simply sum up the Potential of the stars plus the cuadratic velocity in each component
E = Potential [(km/s)^2] + vx^2 + vy^2 + vz^2 [(km/s)^2]
is this correct?
Thanks in advance,
That's right, but with a half factor and make sure the velocities are relative (to the subhalo velocity)
E = U + 0.5 * (dvx^2 + dvy^2 + dvz^2)
Alright, so they have to be refered to the centre of the subhalo right?