Welcome, Guest. Please Login.
Gravity Simulator
11/23/17 at 17:47:15
News: Registration for new users has been disabled to discourage spam. If you would like to join the forum please send me an email with your desired screen name to tony at gravitysimulator dot com.
Home Help Search Login


Pages: 1
Send Topic Print
10 close planets sim (Read 5458 times)
EDG
Ultimate Member
*****


oh, crumbs!!!

Posts: 611
Gender: male
10 close planets sim
12/02/10 at 19:19:44
 
I did this sim to see whether it was possible to pack planets really closely around a star. I set up 10 planets with one earth mass each, in circular, non-inclined orbits, with a separation of 0.1 AU between 1 and 2 AU from the sun, and let the sim run at 16k timestep. After 6400 years a planet was ejected and things started to go horribly wrong Smiley.  
 
I let it run for 13500 years before getting bored (if only there was a way to get it to do screenshots without actually showing the graphics on screen - it took about 2 hours to get to 13500 years with the graphics on, and probably would have taken about 10 minutes if it wasn't plotting everything!)
 
Here's the video (also an experiment, since I've never uploaded anything to youtube before, so it's not really edited or put together well Smiley )
http://www.youtube.com/watch?v=_fOpm8dTDtc
Back to top
 
 

(formerly known as Mal)
View Profile WWW   IP Logged
Tony
YaBB Administrator
*****




Posts: 1051
Gender: male
Re: 10 close planets sim
Reply #1 - 12/02/10 at 22:12:53
 
Quote from Mal on 12/02/10 at 19:19:44:
...(if only there was a way to get it to do screenshots without actually showing the graphics on screen

I wish there was an easy way to do that too.  It's really annoying when some other program like iTunes throws you a popup reminding you to upgrade your software, and the popup shows up in your screenshots!
 
Quote:

...it took about 2 hours to get to 13500 years with the graphics on, and probably would have taken about 10 minutes if it wasn't plotting everything!)

menu > Preferences
Set "Update Graphics Interval" to 50.  Then it should run nearly as fast whether it's plotting or not.  The planets move less than 1 pixel during each iteration with a slow time step.  So there's no need to update the graphics with each iteration.  Using 50 tells it to complete 50 iterations for each graphic update, enabling the simulation to run about 99% as fast as if you turn plotting off altogether.
 
Quote:

Here's the video (also an experiment, since I've never uploaded anything to youtube before, so it's not really edited or put together well Smiley )
http://www.youtube.com/watch?v=_fOpm8dTDtc

Nice youtube.  You'll have to teach me how to do this one day.  Why did you disable comments?  I was going to comment on how cool that was.
 
You can get rid of the annoying scroll bar in your image by pressing the "esc" key on your keyboard.  Press it again to bring it back.  This is called full screen mode.
Back to top
 
 
Email View Profile WWW   IP Logged
EDG
Ultimate Member
*****


oh, crumbs!!!

Posts: 611
Gender: male
Re: 10 close planets sim
Reply #2 - 12/02/10 at 22:42:46
 
Quote from Tony on 12/02/10 at 22:12:53:
menu > Preferences
Set "Update Graphics Interval" to 50.  Then it should run nearly as fast whether it's plotting or not.  The planets move less than 1 pixel during each iteration with a slow time step.  So there's no need to update the graphics with each iteration.  Using 50 tells it to complete 50 iterations for each graphic update, enabling the simulation to run about 99% as fast as if you turn plotting off altogether.

You can get rid of the annoying scroll bar in your image by pressing the "esc" key on your keyboard.  Press it again to bring it back.  This is called full screen mode.

 
OK, seriously. You're going to have to put all these useful little tricks into one thread at some point!! (or better still, a manual!)
 
 
Quote:
Nice youtube.  You'll have to teach me how to do this one day.  Why did you disable comments?  I was going to comment on how cool that was.

 
I did it the somewhat longwinded way - gravsim outputs screens as bmps. Then I use a little program called pjBmp2Avi.exe that you can download from here to stitch them together (I set the frame rate to 5 frames per second, and pick a compression codec from what it shows when I hit the Create button). I made a title page and duplicated it for a few frames and incorporated that into the video too. Then I just uploaded it to youtube.  
 
For all I know, Windows Movie Maker does it a lot more simply, but I'll have to check that out.  
 
I disabled the comments because I can't see them - I have a firefox plugin that blocks them out so I can't see them (if I'm ever looking at other youtube vids, the comments generally make me want to destroy 99% of the human race Wink).
 
I might redo the animation now that I know those little tricks you suggested!
 
I'm probably going to do an article in my Science Blog about this anyway so I'll pimp gravity simulator there as well Smiley.
Back to top
 
 

(formerly known as Mal)
View Profile WWW   IP Logged
EDG
Ultimate Member
*****


oh, crumbs!!!

Posts: 611
Gender: male
Re: 10 close planets sim
Reply #3 - 12/02/10 at 22:56:55
 
OK, that's running faster now!  
 
I set the Graphics Interval to 20 and the screenshots to take one every 50 years. With the graphics interval at 20 the orbits take a second or so to fully render and they're just about complete when the 50-year interval comes up. I guess that's a limiting factor if you want to make an animation.  
 
I noticed another setting in the preferences called "DoEvents" which was set at 50 - what does that do, and how would changing it affect things?
Back to top
 
 

(formerly known as Mal)
View Profile WWW   IP Logged
EDG
Ultimate Member
*****


oh, crumbs!!!

Posts: 611
Gender: male
Re: 10 close planets sim
Reply #4 - 12/02/10 at 23:03:45
 
Hm... I'm running the same simulation as above but with the graphics interval at 50, and it's past 10000 years with no planets being thrown out yet, though the orbits are getting agitated. Is that due to the graphics interval at all, or just chaos?
 
(oh wait, the orbits went crazy around 11000 years this time around. Weird!)
Back to top
 
 

(formerly known as Mal)
View Profile WWW   IP Logged
Tony
YaBB Administrator
*****




Posts: 1051
Gender: male
Re: 10 close planets sim
Reply #5 - 12/02/10 at 23:50:07
 
Adjusting the "Graphics Updates" has absolutely no effect on the accuracy of your simulation.  It's still doing all the same math it did when Graphics Updates was set to 0.  The only difference is that it's plotting the results less frequently.  And since plotting takes lots of time, it slows down your sim big-time.  This is not true when you speed up your sim with the time step.  In that case, it uses less-accurate math to speed things up.  Just for fun, set it to 500 or 5000.  It will look like its plotting random pixels.  Set it back to 50 and the sim looks normal again.
Back to top
 
 
Email View Profile WWW   IP Logged
EDG
Ultimate Member
*****


oh, crumbs!!!

Posts: 611
Gender: male
Re: 10 close planets sim
Reply #6 - 12/03/10 at 01:09:42
 
So what would changing the DoEvents value (not the graphics one) do? I'm guessing that changes the frequency at which it actually recalculates everything? (it's currently set at 50).
Back to top
 
 

(formerly known as Mal)
View Profile WWW   IP Logged
Tony
YaBB Administrator
*****




Posts: 1051
Gender: male
Re: 10 close planets sim
Reply #7 - 12/03/10 at 07:08:11
 
Do Events tells Gravity Simulator's integrator how often to check for user input such as keystrokes, button presses or menu clicks.  50 means check every 50th iteration.  Gravity Simulator can not monitor for user input during the middle of an iteration.  It can only do it inbetween iterations.  If set too high, you'll notice that the program seems unresponsive.  It's difficult to pause the program because it doesn't recognize that you've pressed the pause button.  If you set it too low, then the program wastes lots of time monitoring for user input.  50 is a nice compromise for simulations with 1-100 objects.  The program should seem very responsive.  If you have hundreds of objects, it takes the integrator longer to complete each iteration.  This makes it seem unresponsive to user requests.  With this many objects, the time spent checking for user input is insignificant compared to the time spent per iteration computing new positions and velocities.  So you would want to set it to a lower number, perhaps even 1.  Then the program will seem responsive again.
 
The frequency at which it recalculates everything is the time step.  If set to 64, then it recalculates the positions and velcities of each object once every 64 simulated seconds.  i.e. If the Earth is at position 0,0,0 with a velocity of 0, 30000, 0, then it calculates where it will be in 64 seconds from now, which should be about 0, (30000*64), 0.  Changing the time step affects the accuracy of the simulation:  the smaller the better.
 
There is no control for adjusting the frequency at which it recalculates everything in real time.  Gravity Simulator simply tries to do as many iterations per second as your system resources allow.
Back to top
 
 
Email View Profile WWW   IP Logged
frankuitaalst
Ultimate Member
*****


Great site

Posts: 1507
Gender: male
Re: 10 close planets sim
Reply #8 - 12/03/10 at 12:55:01
 
Nice sim Mal .  
I've performed the same sim at a timestep of 1024 seconds and got a datafileoutput each 1 year .
 The system is unstable due to strong interactions , especially between the outer bodies .  
Here's a screenshot with the Gsim viewer showing the evolaution of the outermost 5 bodies .  
The instability seems to be induced by an interaction after about 6400 years between the 8th and 9th body , later also going over on the outermost body . Later on also the 7th body is affected .  
The instability is steadily growing as I noticed a steady growth of the eccentricity .
Back to top
 

PicTimeSma10Earths__9009_years.jpg
Email View Profile   IP Logged
EDG
Ultimate Member
*****


oh, crumbs!!!

Posts: 611
Gender: male
Re: 10 close planets sim
Reply #9 - 12/03/10 at 13:04:06
 
This all started from a discussion on SFRPG boards asking how densely packed planets could be around K and M V stars. I figured that the lowest limit would be the hill spheres of the the planets, and the Earth's hill sphere is about 0.01 AU so these planets are separated about 10 times further than that distance - but it seems that the limit is much higher than the hill sphere.  
 
Now I think of it, I guess the next limiter is resonances. In this kind of artificial situation anyway, the planets at 1.0 AU and 1.6 AU should be in a 2:1 resonance, right? But when I look at the sim, those planets' orbits seem fairly stable, and it's the outermost ones that start getting 'wobbly' first (in fact the 'wobbling' seems to start at the outer orbits and move inwards).
 
So are there non-resonant (forgot what they're called - secular? osculating?) interactions going on?
Back to top
 
 

(formerly known as Mal)
View Profile WWW   IP Logged
EDG
Ultimate Member
*****


oh, crumbs!!!

Posts: 611
Gender: male
Re: 10 close planets sim
Reply #10 - 12/03/10 at 16:22:12
 
Here's another attempt at it, this time running for 15000 years.
 
http://www.youtube.com/watch?v=aQMHWpA3viI
 
(again, comments are disabled there so please comment about it here!)
Back to top
 
 

(formerly known as Mal)
View Profile WWW   IP Logged
EDG
Ultimate Member
*****


oh, crumbs!!!

Posts: 611
Gender: male
Re: 10 close planets sim
Reply #11 - 12/03/10 at 22:04:17
 
And here's the Ultimate Version, which runs for 175,000 years and has some serious craziness in it Smiley
 
http://www.youtube.com/watch?v=571V9glMOIk
Back to top
 
 

(formerly known as Mal)
View Profile WWW   IP Logged
frankuitaalst
Ultimate Member
*****


Great site

Posts: 1507
Gender: male
Re: 10 close planets sim
Reply #12 - 12/06/10 at 11:48:13
 
Quote from Mal on 12/03/10 at 13:04:06:

So are there non-resonant (forgot what they're called - secular? osculating?) interactions going on?

 
I think the instability is due to cyclic perturbations between bodies . Don't know if there's a specific term for it .  
I was also wondering why the outermost body was less perturbed than the outermost minus one body .  
I assumed the outermost must have been the least stable as it is more loosely bound to the central body then the others .  
This doesn't seem to be the case .  
To find out I've set up the system with 11 earths ranging from 1 AU to 3AU at an interval of 0.2 AU and outputted the Sma evolution .  
This system seems to be stable .  
The animation hereunder gives the evolution of the Sma as a function of time (0-3000 years) for each of the 11 bodies , starting at the innermost .
It is obviously clear that the perturbations grow as we get further from the central body .  
But , the clue is at the end : the last body (11) is perturbed only in one direction , while the 10th body is perturbed by the 9th and by the 11th one , resultiing in a bigger perturbation .  
Back to top
 

11Earthsat1to3AU_Sma.gif
Email View Profile   IP Logged
EDG
Ultimate Member
*****


oh, crumbs!!!

Posts: 611
Gender: male
Re: 10 close planets sim
Reply #13 - 12/15/10 at 16:11:04
 
Quote from Tony on 12/02/10 at 22:12:53:
I wish there was an easy way to do that too.  It's really annoying when some other program like iTunes throws you a popup reminding you to upgrade your software, and the popup shows up in your screenshots!

 
There's *got* to be a way to do this. I'm no programming expert, but can you not maybe get it to "draw" the image in some kind of file buffer and only actually render the image on the screen if the user wants to see it? Then you can get it to take the screenshots from the data in the buffer instead?  
Back to top
 
 

(formerly known as Mal)
View Profile WWW   IP Logged
Tony
YaBB Administrator
*****




Posts: 1051
Gender: male
Re: 10 close planets sim
Reply #14 - 12/15/10 at 16:37:37
 
Quote from EDG on 12/15/10 at 16:11:04:
Quote from Tony on 12/02/10 at 22:12:53:
I wish there was an easy way to do that too.  It's really annoying when some other program like iTunes throws you a popup reminding you to upgrade your software, and the popup shows up in your screenshots!


There's *got* to be a way to do this. I'm no programming expert, but can you not maybe get it to "draw" the image in some kind of file buffer and only actually render the image on the screen if the user wants to see it? Then you can get it to take the screenshots from the data in the buffer instead?

Yes, it can be done like that.  The next time I update the graphics, I'll make it like that.  It will also let you change viewing angles without losing your trails.  For the meantime, the screenshot coding is about 5 lines, and does a pretty good job for the effort.  I see you got your name changed.  As you probably figured out, "tester" and "tester2" are me.
Back to top
 
 
Email View Profile WWW   IP Logged
Pages: 1
Send Topic Print