Challenge: Model Solar System

What did you draw?
19683
Posts: 151
Joined: Wed Jun 05, 2013 12:15 pm

Challenge: Model Solar System

Post by 19683 »

Try to make as close a model as possible for our solar system, including planets, moons, and asteroids.

Make it as stable as possible (eventually the planets' gravity will destabilize the system)
Binomial Theorem: ((a+b)^n)= sum k=0->k=n((n!(a^(n-k))(b^k))/(k!(n-k)!))
User avatar
robly18
Posts: 413
Joined: Tue Jun 04, 2013 2:03 pm

Re: Challenge: Model Solar System

Post by robly18 »

Sadly, you can only do this up to jupiter do to the limit on planets
Convincing people that 0.9999... = 1 since 2012
19683
Posts: 151
Joined: Wed Jun 05, 2013 12:15 pm

Re: Challenge: Model Solar System

Post by 19683 »

robly18 wrote:Sadly, you can only do this up to jupiter do to the limit on planets
You could skip planets.

I tried Mercury, Earth, Mars, Jupiter, and Uranus, but it was (highly) unstable. Pretty soon, Uranus and Mars were flung out of the system, Jupiter and mercury collided with the sun, and Earth had a crazy elliptical orbit, ranging from Mercury distance to Jupiter distance.
Binomial Theorem: ((a+b)^n)= sum k=0->k=n((n!(a^(n-k))(b^k))/(k!(n-k)!))
User avatar
robly18
Posts: 413
Joined: Tue Jun 04, 2013 2:03 pm

Re: Challenge: Model Solar System

Post by robly18 »

19683 wrote:Pretty soon, Uranus and Mars were flung out of the system
So basically, Uranus left the solar system?
Convincing people that 0.9999... = 1 since 2012
A Random Player
Posts: 523
Joined: Mon Jun 03, 2013 4:54 pm

Re: Challenge: Model Solar System

Post by A Random Player »

robly18 wrote:Sadly, you can only do this up to jupiter do to the limit on planets
Not necessarily.. You can add more by editing the code, and be a lot more exact as well.
For perfectionists (or close to them) like me, you can use this to be very accurate on the planets (unless someone can find something like the Wikipedia for the solar system that gives orbital velocity. And remember G in this sim is one, instead of 6.67×10^-11 N*m^2/kg^2, so you'd need to scale either time or distance.
(I think I overthought this :lol:)
$1 = 100¢ = (10¢)^2 = ($0.10)^2 = $0.01 = 1¢ [1]
Always check your units or you will have no money!
19683
Posts: 151
Joined: Wed Jun 05, 2013 12:15 pm

Re: Challenge: Model Solar System

Post by 19683 »

robly18 wrote:
19683 wrote:Pretty soon, Uranus and Mars were flung out of the system
So basically, Uranus left the solar system?
Yes.

This doesn't happen in the real solar system because the planets are small and far apart.
Binomial Theorem: ((a+b)^n)= sum k=0->k=n((n!(a^(n-k))(b^k))/(k!(n-k)!))
User avatar
robly18
Posts: 413
Joined: Tue Jun 04, 2013 2:03 pm

Re: Challenge: Model Solar System

Post by robly18 »

19683 wrote:
robly18 wrote:
19683 wrote:Pretty soon, Uranus and Mars were flung out of the system
So basically, Uranus left the solar system?
Yes.

This doesn't happen in the real solar system because the planets are small and far apart.
So in the real solar system, Uranus is very far from Earth? I see...

Am I immature?
Convincing people that 0.9999... = 1 since 2012
User avatar
testtubegames
Site Admin
Posts: 1148
Joined: Mon Nov 19, 2012 7:54 pm

Re: Challenge: Model Solar System

Post by testtubegames »

A Random Player wrote:
robly18 wrote:Sadly, you can only do this up to jupiter do to the limit on planets
Not necessarily.. You can add more by editing the code, and be a lot more exact as well.
For perfectionists (or close to them) like me, you can use this to be very accurate on the planets (unless someone can find something like the Wikipedia for the solar system that gives orbital velocity. And remember G in this sim is one, instead of 6.67×10^-11 N*m^2/kg^2, so you'd need to scale either time or distance.
(I think I overthought this :lol:)
That's great! I haven't gone through and made such an accurate solar system before, myself. I'm sure there's a limiting factor -- (like the accuracy or allowed masses) -- but any such limit may be easy to fix once we identify it. I just updated the simulator to allow **infinite** planets/satellites, for instance. So at least that hurdle is gone. I'm not sure how much that'll help with making our solar system, since as you say, precision is key... and for that you'd likely want to use the code.
A Random Player
Posts: 523
Joined: Mon Jun 03, 2013 4:54 pm

Re: Challenge: Model Solar System

Post by A Random Player »

I'm actually trying this, but I got stuck. G in this sim is 1, so the orbital period of this should be 2pi*sqrt(100^3/1000):

Code: Select all

Gravity Fun at TestTubeGames.com: [ForceG: -2,Qual: 1,Zoom: 1,xSet: -2,ySet: 1], [x0: 0,y0: 0,vx: 0,vy: 0,t0: 0,who: 1,m: 1000], [x0: 100,y0: 0,vx: 0,vy: -3.1622776601683795,t0: 0,who: 2,m: 100]
But after measuring the orbital period, I'm getting about 5.6126 sec (timed 10 orbits and divided, not 1 of course :))
The ratio of the two numbers is 35.40102—they aren't the same. Is the sim running at 35 FPS or something?
$1 = 100¢ = (10¢)^2 = ($0.10)^2 = $0.01 = 1¢ [1]
Always check your units or you will have no money!
User avatar
testtubegames
Site Admin
Posts: 1148
Joined: Mon Nov 19, 2012 7:54 pm

Re: Challenge: Model Solar System

Post by testtubegames »

Yes, good catch there. I went through your math, and ran that simulation with a stopwatch, and found the same discrepancy. And you've got the reason right. It turns out the 'time' in the simulator doesn't exactly match the 'time' in the outside world. There's a conversion you have to do.

So, digging back into it, I see that the simulation runs at (basically) 40 FPS. And during each of those frames, the simulator calculates trajectories and moves the planets .9 seconds ahead. So for every second in the real world, you're seeing 36 seconds in the simulator world. So the orbits you see would go 36 times more rapidly than expected (from your calculations). It looks like your experiment was pretty darn accurate.

Also, this holds for the t0 value in the load-codes, too. So if you put in two identical versions of that asteroid, but offset the t0 by 5.6 units, they will not be a full orbit off. But if you offset it by about 200, the second one will appear just after the first completes an orbit:

Code: Select all

Gravity Fun at TestTubeGames.com: [ForceG: -2,Qual: 1,Zoom: 1,xSet: 21,ySet: 4], [x0: 0,y0: 0,vx: 0,vy: 0,t0: 0,who: 1,m: 1000], [x0: 100,y0: 0,vx: 0,vy: -3.1622776601683795,t0: 0,who: 3,m: 0], [x0: 100,y0: 0,vx: 0,vy: -3.1622776601683795,t0: 203.4,who: 3,m: 0]
Post Reply