The gravitational constant is often
set to unity in N-body codes, since it saves a precious floating point operation!
However, for sake of completeness, here are a few common values of G in
some other ’common’ unit systems, recalling that G*m/(r*v*v) is dimensionless:

masslengthvelocityG1/Gtime"system" gcmcm/s6.6732e-81.49853e+07s(cgs) kgmm/s6.6732e-111.49853e+10s(SI) Mpckm/s.2.32385e21e6.yr(starcluster) Mkpckm/s.2.32385e51e9.yr. 1e10.M10.kpc100.km/s.2.323851e8.yr(galaxy) 1e10 M1.kpc1.km/s43007.1.1e9.yr[gadget] ~2e4.Mkpc~990.km/s111e6.yr(galaxy) 1e11.M10.kpc~97.8.km/s4.4970.222371e8.yr(galaxy)

G = 1 M = 1 E = -1/4 where G is the gravitational constant, M the total initial mass, and E the initial energy. The corresponding units of mass, length and time are then U_m = M U_l = - G M^2 / (4E) U_t = G M^2.5 / (-4E)^1.5 (cf. Henon, 1972).The choice for E looks odd, but corresponds to a virial radius R (harmonic mean particles separation) equal to unity for a system in virial equilibrium. In N-body work a somewhat different, actually N-dependant, system is often used (cf. Aarseth 1972), but leads to a crossing time scale proportional to N^(-1/2). This system is also unsuitable for galaxy simulations, where neither the number of stars nor the number of particles in the simulation is relevant to the imortant dynamical timescales. There are of course stellar dynamical calculations for which the above described units are unsuitable, e.g. unbound systems or cosmological simulations.

Heggie, D.C. and Mathieu, R.D. Standardized Units and Time Scales, in: The Use of Supercomputers in Stellar Dynamics, ed. P. Hut and S. McMillan. (1986, Spinger Verlag)NPL’s United of Measurement webpage: http://www.npl.co.uk/npl/reference/ AstroTables: http://nedwww.ipac.caltech.edu/level5/tabular_info.html

7-may-96CreatedPJT