Distance $r$ between galaxies inside the galaxy cluster I am currently working on the dynamics of the galaxy cluster, so i am trying to get the distance  $r$ between the galaxies inside the galaxy cluster from its centre.  As a input i have RA , DEC  and Z (Redshift of the galaxies and its centre). my approach is something like this
#  comoving distances
D_cl=cosmos.comoving_distance(z).value #  z for each galaxy
D_clus=cosmos.comoving_distance(z_cl).value # z_cl for Cluster's centre

c1 = SkyCoord(ra_cl*180/np.pi *u.deg, dec_cl*180/np.pi *u.deg, distance=D_cl*u.Mpc, frame='icrs')
c2 = SkyCoord(ra*180/np.pi *u.deg, dec*180/np.pi *u.deg, distance=D_clus*u.Mpc, frame='icrs')
distance_3d = c1.separation_3d(c2)
distance_3d

So after using this method i am getting a wrong value's  (Almost 70 Mpc for a given redshift distribution of the galaxy cluster,  therefore i would like to know what can i change or adapt to have right measurement of the 3d distances or my method is wrong. As you can see i am going to use this distance r in order to calculate the jeans solution.  where i need two distances r and R.

*

*R is the projected distance of the galaxies from clusters centre (which i already calculated)


*r is the actual 3d distance of the galaxies from clusters centre
 A: You can't calculate the distances to galaxies in a cluster like that to any useful precision.
The mean redshift will give you an estimate of the mean distance of the cluster, but the individual galaxies have perturbations around this value to that reflect their dynamics within the cluster rather than cosmological redshift. These "peculiar velocities" with respect to the cluster mean can be as large as 1000 km/s (RMS), which leads to distance error bars of order 15 Mpc compared with a typical cluster diameter of a few Mpc. And of course, some small fraction of deviations could be several times this RMS error.
In general, I do not think there is any reliable way to estimate the 3D positions of cluster galaxies with respect to the cluster centre for distant clusters. For closer clusters (Virgo) there is the possibility of using some of the other distance ladder indicators (Cepheids, globular clusters, most luminous red giants, fundamental plane, Tully-Fisher etc.) to get the individual galaxy distances with a precision somewhat better than the cluster diameter (e.g. Gavazzi et al. 1999; Solanes et al. 2002).
