2
$\begingroup$

I'm doing a computer simulation of the solar system and I'm having trouble working with big numbers (implementation specific problem). So what would be the Newtonian gravitational constant $G$ in relation with the Earth mass instead of kilograms and astronomical units instead of meters?

$\endgroup$
2
  • 1
    $\begingroup$ I'm curious what implementation runs into trouble here. Even single-precision floats should comfortably hold $GM_\odot$, $r^2$, and their quotient in SI units. I only ask because many solar system simulations out there use unstable integration algorithms, and people sometimes blame floating-point precision for the inevitable problems that arise. $\endgroup$
    – user10851
    May 13, 2014 at 22:52
  • $\begingroup$ @ChrisWhite You make an excellent point, but I wouldn't consider a factor of $10^8$ a "comfortable" margin: you couldn't compute things like $M_\odot r^2$ in kg m$^2$ for $r$ comparable to an AU. Integration stability is a tricky subject, though. Sensible units are a big help in debugging any model, so Isracg is on the right track. $\endgroup$
    – rob
    May 13, 2014 at 23:08

3 Answers 3

7
$\begingroup$

From Kepler's third law you can find that $$ \frac{GM_\odot}{4\pi^2} = 1 \frac{\text{AU}^3}{\text{year}^2} $$ where $M_\odot$ is the mass of the sun. For a solar system simulation these units will be more convenient than Earth masses.

$\endgroup$
1
  • 1
    $\begingroup$ This is a clever approach. Regarding the specific question asked, this is sufficiently complete to write a version of G in these "big" units. You can easily show that $G=4 \pi^2$ when your units are AU, solar mass, and year. This forms an explicit answer to the question. $\endgroup$ May 13, 2014 at 16:15
4
$\begingroup$

This is a typical "unit conversion" problem. Write $G$ in SI units:

$$G=6.6738\times10^{-11} \frac{\text{m}^3}{\text{kg}\cdot\text{s}^2}.$$

Now find out how many kilograms are in an Earth mass, and how many meters are in an astronomical unit. Also consider converting seconds to some other more convenient measure of time so that $G$ comes close to unity. (Thanks, Davidmh.)

All of this should help you convert units. See this page for further help.

$\endgroup$
4
  • 4
    $\begingroup$ You forgot a factor of $10^{-11}$ in expression for $G$. $\endgroup$
    – user10001
    May 13, 2014 at 6:31
  • $\begingroup$ So it would be: $$G=1.1904\cdot10^{-19}\frac{\text{AU}^3}{\text{M⊕}\cdot\text{s}^2}.$$ Is this correct? $\endgroup$
    – Isracg
    May 13, 2014 at 6:38
  • 1
    $\begingroup$ But you probably want to use a different time unit that seconds, such that $G$ is of the order of $1$ for numerical accuracy. $\endgroup$
    – Davidmh
    May 13, 2014 at 7:56
  • $\begingroup$ a year for example :) $\endgroup$
    – jwenting
    May 13, 2014 at 14:41
2
$\begingroup$

In practice, one does not use G in astronomical calculations in this way.

GM is known more exactly than G or M. The mass of the earth, for example, is GM=398.6005 E12 m³/s², and is this value as far back as i have been able to trace it.

This is the value that NASA uses when they put man on the moon, so to speak.

$\endgroup$
1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.