Modeling stellar orbits

Started by
94 comments, last by taby 13 years, 4 months ago
Quote:Original post by h4tt3n
Oh, and by the way... how did you do this? I never got it working properly.


It might be a side effect of how I update my universe, but when I run through the list of all bodies to calculate the gravitational pull of one on another, I keep track of the body that has applied the greatest gravitational forces to each body in that body's "myParent" member variable. From my very basic understanding of the sphere of influence, the body that applies the largest gravitational forces at any time on a body will also be the one that that body orbits around. Then I just grab the orbital elements between each body and its now-predetermined parent each frame and draw an ellipse. Of course you gotta remember to clear each body's parent info at the end of each draw, so that you can recalculate any new parent it might have at the next timestep.

I don't know if this will work in every SINGLE case ever, but I myself can't find a hole in the logic, and in practice it appears to work just fine. Stars can and do swap orbital parents all the time depending on how complex the solar system is, and the ellipses automatically switch with them. It's a great way to see how larger stars can potentially "steal" the moon of a planet and make it just another orbiting body of the star itself!

I had some similar thoughts to you about the whole center-of-mass thing for calculating orbits, I'm stuck trying to work out the quickest method to calculate the center of mass for each "system" in the universe. Probably some sort of tree-structure that relates parents to their satellites each frame so that I can only calculate specific centers of mass based on the leaves of each branch, or something along those lines...

Advertisement
Quote:Original post by ChugginWindex
It might be a side effect of how I update my universe, but when I run through the list of all bodies to calculate the gravitational pull of one on another, I keep track of the body that has applied the greatest gravitational forces to each body in that body's "myParent" member variable. From my very basic understanding of the sphere of influence, the body that applies the largest gravitational forces at any time on a body will also be the one that that body orbits around. Then I just grab the orbital elements between each body and its now-predetermined parent each frame and draw an ellipse.


Hmmm... sorry, but that doesn't make sense. The gravitational pull between the Sun and the Moon is more than twice as large as the pull between the Earth and the Moon. Still, we say the Moon orbits the Earth. But yes, the solution seems to be some sort of hierarchy. The Moon primarily orbits the Sun, of course, and secondly orbits the Earth.
Quote:Original post by h4tt3n
Quote:Original post by ChugginWindex
It might be a side effect of how I update my universe, but when I run through the list of all bodies to calculate the gravitational pull of one on another, I keep track of the body that has applied the greatest gravitational forces to each body in that body's "myParent" member variable. From my very basic understanding of the sphere of influence, the body that applies the largest gravitational forces at any time on a body will also be the one that that body orbits around. Then I just grab the orbital elements between each body and its now-predetermined parent each frame and draw an ellipse.


Hmmm... sorry, but that doesn't make sense. The gravitational pull between the Sun and the Moon is more than twice as large as the pull between the Earth and the Moon. Still, we say the Moon orbits the Earth. But yes, the solution seems to be some sort of hierarchy. The Moon primarily orbits the Sun, of course, and secondly orbits the Earth.


Yeah, I had a feeling that anyone with more knowledge of this than me would point out that I'm making a lot of assumptions in this method and that it doesn't always work. However like I said, it works in my simulation. I can't explain why, but if you run the latest one that I've linked to a few posts up, you'll see the process in action using the method I described here.

I think it's because the force of gravity is also a function of the distance between bodies. If the planet is far enough away from the star, it exerts more force on its moon than the sun does, regardless of which is truly orbiting which. If the planet isn't far enough away to be the dominating force of gravity compared to the star, the star always yanks the moon out of orbit around the planet, at least temporarily. The more I think about this the more I wonder if my method really IS that incorrect, because if the sphere of influence is just the area around a body where that body produces the dominating gravitational forces, then I don't see how I'm doing anything wrong.

Edit: Also, I might just not understand enough, but if what you're saying is true about the gravitational pull between the sun and the moon being more than twice what the pull is between the earth and the moon, wouldn't that mean that during a solar eclipse, the sun would pull the moon away from the earth with the same net force as the earth typically pulls on the moon with?
Quote:Original post by ChugginWindex...


I think you have mostly the right idea.

Yeah sure the Sun's gravitation is stronger, but the Moon and the Earth both get pulled toward the Sun at (very roughly) the same amount. When you travel alongside the Moon and Earth as they co-orbit the Sun at around 30km/s, you travel in what's technically called their shared "reference frame". Another reference frame would be the one shared by the Sun, Earth and Moon as all three orbit around the Galactic centre at about 220km/s.

All of the gravitational accelerations we've talked about here in these different reference frames are actually quite weak in strength compared to that near the event horizon of a black hole. As well, the strength of gravitation doesn't vary much (practically not at all) within these reference frames. Because of these aspects, you can treat the reference frames as practically non-accelerating (inertial) and flat in terms of the spacetime within it (Minkowskian). According to the theory of special relativity, the physics that go on within ANY inertial reference frame will always be the same no matter where or when that reference frame exists. The main result of this theory is that since the Sun/Moon/Earth frame is a practically inertial reference frame, we can completely ignore the motion around the Galactic centre when performing Solar System simulations -- it's as if the Solar System doesn't move at all through the Galaxy, which makes things very simple.

When the reference frame is being accelerated strongly, or gravitation varies in strength considerably within the reference frame, then you'll need general relativity. Special relativity is only a special case that deals only with inertial reference frames. General relativity deals with all reference frames.

Mind you, even though the reference frames that we talked about here are all practically inertial, they are not fully so. If the Solar System were to consist of only Mercury and the Sun, we would find that Mercury's orbit plane actually rotates roughly 43 arcseconds per Earth century, ultimately forming not an ellipse but a flowery petal-like design. This effect is not replicated by Newtonian gravitation. I won't get into much technical detail, but this effect relies both on Mercury's position and Mercury's speed. Yes indeed, the strength of gravitation is a little dependent on how fast you're going with respect to the source of gravitation. Strange indeed, but it's true. :)

[Edited by - taby on December 10, 2010 9:14:20 PM]
Are we just talking about the effects of gravity gradients here? You definitely can't have satellites very deep into another gravity well. The Moon can orbit the Earth in a stable manner without the Sun tearing it away because as it moves from one end to the other, the force is roughly the same.

If it was dramatically close, tidal forces would be a serious issue. Try orbiting Mimas in Orbiter Sim!
JoeCooper, you bring up a good point.

But let's be perfectly clear so that no one gets confused -- it is the gradient of the strength of gravitation that causes acceleration, and it is the gradient of this gradient that causes tidal force.

In other words, for the simple Schwarzschild metric that describes our Sun fairly well, gravitational acceleration is based on the first-order derivative "the rate of change of gravitational time dilation/length contraction with respect to the rate of change in coordinate distance from the gravitational source", and tidal force is based on the second-order derivative.

What would be totally awesome is if the snow were affected by tidal forces nearly as strongly as liquid water is. That way every day, twice a day, all the snow in Canada would bunch up here in Saskatchewan and we could have a giant snowball fight. Then we wouldn't have to clean up the mess because the snow would eventually just move itself back to Manitoba and Alberta, etc. Nice dream.

This topic is closed to new replies.

Advertisement