Question about orbital mechanics

General discussion about Celestia that doesn't fit into other forums.
Topic author
Liquidscript
Posts: 8
Joined: 13.01.2003
With us: 21 years 10 months
Location: Arizona

Question about orbital mechanics

Post #1by Liquidscript » 26.01.2003, 21:11

Hey,
I've been messing around with Celestia for a while now, and I think it's quite impressive. I recently programmed a little program for my TI-86 calculator that would simulate two particles of different masses and how they would interact given a position and a starting velocity.

I used newton's law of universal gravitation, which seems to work quite nicely, but I'm having trouble understanding the application of Keplerian orbits. I know Keplerian orbits are composed of the conic sections, but I've gotten some orbits in my program that don't seem to be uniformly elliptical or of a determined shape.

For example, if I set one particle to have a great mass, lets say 5x10^10 and the other to have a mass of 20, and they are five units apart, and the large particle is stationary, and the small particle starts out with a velocity of about .5 perpendicular to the direction of the large body, then the small particle orbits around a few times, but its orbit seems to rotate and expand for each rotation, which certainly is not explained with Keplerian orbits. Do orbits have to be in the shape of a conic section when there are only two bodies?

Do you think this discrepency can be explained because of the limit on the precision for values on my calculator? There are only 14 decimal digits per floating point value allowed.

I can show you the source code if any of you are familiar with it. Its very very similar to BASIC.

Thanks.

granthutchison
Developer
Posts: 1863
Joined: 21.11.2002
With us: 22 years

Post #2by granthutchison » 26.01.2003, 21:55

Sounds like you need to shorten your recalculation interval. If this is too long, then your particle is not going to behave in a Newtonian way, because you're not picking up significant changes in gravitational force/direction between calculations.
Try keeping everything else the same but shortening your recalculation interval tenfold, and see what happens to the shape of the orbits - if that's the problem, you should see them tighten towards ellipses.

Grant

Topic author
Liquidscript
Posts: 8
Joined: 13.01.2003
With us: 21 years 10 months
Location: Arizona

Post #3by Liquidscript » 27.01.2003, 06:26

Thanks, I've finally implemented a correct method of time scaling, and the orbital errors are greatly reduced. I guess its just the error resulting from a finite number of calculations as the object is influenced by gravitational forces instead of an infinite number that truely occurs.

Guest

Post #4by Guest » 27.01.2003, 15:31

It's great to know other people besides me are doing crazy things with a calculator ! I've done the same thing using Qbasic, but I started off with the basic code (having only one mass moving) on my calculator (it couldn't handle both masses moving, not enough computational power (well enough, but mind-numbingly slow)). Of course the computer is much faster, you can watch planets twirl around each other....

I've been beaten to giving advice, as grathutchison has already said it !

(Mad Boris)

granthutchison
Developer
Posts: 1863
Joined: 21.11.2002
With us: 22 years

Post #5by granthutchison » 27.01.2003, 16:14

Caxton Foster's book The Orrery: Computer Models of Astronomical Systems, from Willmann-Bell Inc, is well worth looking out for if you're interested in this sort of thing.

Grant


Return to “Celestia Users”