Jump to content

Recommended Posts

Posted

Hello,

 

I'm currently working on a small educational program that illustrates how planets orbit the sun. I'm learning the neccesary math, physics and programming on the fly, which is very interestng but also quite frustrating! I hope you might help me with some problems...

 

When working with orbital mechanics (or celest mechanics) You often use the gravitational constant G and the total mass of the system M, beeing very close to just the mass of the sun. This have caused me a grat deal of worry: G is 6.673e-11 N*m^2/kg^2 and Msun is 1.989e+30 kg, but when I use these values my formulas go amok.

Just yesterday I found out that the two constants are often combned in th so called "standard gravitational parameter" which for the sun has the value 132,712,440,018 Km^3*s^-2, and when I used this value my program worked perfectly.

 

But when I multiply the two numbers I get 1.327e+20 rather than the actual value of 1.327e+11. What am I doing wrong?

 

Any other general or specific advice on how to program orbital mechanis will be received with gratitude.

 

Best regards,

Michael

 

(please note that I use SI units, not U.S. ones...)

Posted
G is 6.673e-11 N*m^2/kg^2 and Msun is 1.989e+30 kg' date=' but when I use these values my formulas go amok.

Just yesterday I found out that the two constants are often combned in th so called "standard gravitational parameter" which for the sun has the value 132,712,440,018 Km^3*s^-2, and when I used this value my program worked perfectly.

 

But when I multiply the two numbers I get 1.327e+20 rather than the actual value of 1.327e+11. What am I doing wrong?

[/quote']

 

You're committing the first sin of physics calculations: no units.

 

Your second term has km3 in the units, but the factors in it have m. 1 km3 = 109m3

Posted
Hello' date='

 

I'm currently working on a small educational program that illustrates how planets orbit the sun. I'm learning the neccesary math, physics and programming on the fly, which is very interestng but also quite frustrating! I hope you might help me with some problems...

 

When working with orbital mechanics (or celest mechanics) You often use the gravitational constant G and the total mass of the system M, beeing very close to just the mass of the sun. This have caused me a grat deal of worry: G is 6.673e-11 N*m^2/kg^2 and Msun is 1.989e+30 kg, but when I use these values my formulas go amok.

Just yesterday I found out that the two constants are often combned in th so called "standard gravitational parameter" which for the sun has the value 132,712,440,018 Km^3*s^-2, and when I used this value my program worked perfectly.

 

But when I multiply the two numbers I get 1.327e+20 rather than the actual value of 1.327e+11. What am I doing wrong?

 

Any other general or specific advice on how to program orbital mechanis will be received with gratitude.

 

Best regards,

Michael

 

(please note that I use SI units, not U.S. ones...)[/quote']

 

Just to elaborate on what Tom said, you probably did get the right answer by multiply GM instead of using mu. You were just off by a factor of 1000 because you were expecting different units.

 

For example, to compute the circular velocity of Earth around the Sun (assume circular orbit):

 

vc.GIF

 

If you don't want to write your own program, you can use one I wrote, available here: http://www.gravitysimulator.com.

 

But writing your own is fun and educational.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.