Planetary Simulation

Discuss interdimensional programming, Java applets and so forth.

Planetary Simulation

Postby anderscolingustafson » Sun May 11, 2014 8:11 pm

How do you set up a planetary simulation in which you can change the laws of physics in the simulation?
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
anderscolingustafson
Tetronian
 
Posts: 312
Joined: Mon Mar 22, 2010 6:39 pm

Re: Planetary Simulation

Postby ICN5D » Wed May 14, 2014 6:04 am

Check this out. And, this one. As well as this one, it might have some good links. Or, maybe this one, if you're good at programming. Or, this one, looked like fun!
in search of combinatorial objects of finite extent
ICN5D
Pentonian
 
Posts: 1037
Joined: Mon Jul 28, 2008 4:25 am
Location: Orlando, FL

Re: Planetary Simulation

Postby quickfur » Wed May 14, 2014 5:05 pm

I remember somebody posted a link here some time ago to an applet that lets you choose various orbital system parameters, such as the mass of the star, which inverse law gravity obeys (1/r, 1/r^2, 1/r^3, etc.), and you can place points representing planets on the chart and set their initial momentum.

Playing around with it gave a good intuition on why anything other higher than 1/r^2 is basically impossible to make a stable orbit out of. I think 1/r actually does give stable orbits as well, in the form of petal-shaped curves (the orbital path traces out flower petals), and 1/r^2 of course gives the familiar elliptical orbits. I could hardly get a single revolution around the star with 1/r^3, don't even talk about long-term stability! Almost every attempt crashes into the star after less than 1 revolution, or flies off into outer space around the same time. Even the theoretically possible spiralling path (where the orbital distance changes by a constant amount per revolution) is almost next to impossible to get, and those aren't stable paths either (and definitely not habitable for life, since every year the distance to the sun will change, so you will either fry after n years, or freeze to death). Perfect circular orbits require such extreme precision (not to mention extreme sensitivity to the smallest perturbations) that in practice it simply doesn't exist.
quickfur
Pentonian
 
Posts: 2435
Joined: Thu Sep 02, 2004 11:20 pm
Location: The Great White North

Re: Planetary Simulation

Postby anderscolingustafson » Wed May 14, 2014 8:29 pm

I remember somebody posted a link here some time ago to an applet that lets you choose various orbital system parameters, such as the mass of the star, which inverse law gravity obeys (1/r, 1/r^2, 1/r^3, etc.), and you can place points representing planets on the chart and set their initial momentum.


Do you remember what the link was or where it was posted?
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
anderscolingustafson
Tetronian
 
Posts: 312
Joined: Mon Mar 22, 2010 6:39 pm

Re: Planetary Simulation

Postby quickfur » Wed May 14, 2014 8:57 pm

Found it, the link is in this post.
quickfur
Pentonian
 
Posts: 2435
Joined: Thu Sep 02, 2004 11:20 pm
Location: The Great White North

Re: Planetary Simulation

Postby anderscolingustafson » Fri May 16, 2014 3:29 am

Thank You quickfur!

I tried running some of the planetary simulations using different inverse laws.

I tried using 1/r^3 and failed to produce stable orbits.

I also tried using r^3 and found that while I could not get stable orbits with 1/r^3 it was very easy to get stable orbits using r^3. Using direct r^3 has some interesting properties such as that the further away the planet is the faster it moves as the gravity increases with distance rather than decreasing. Using r^3 also produce an orbit that forms the shape of a flower.

I also tried some inverse laws that were between inverse square laws and inverse cube laws. I found that I could produce stable orbits by with the equation 1/r^2.95 if I launched a planet just right. For stable orbit using the equation 1/r^2.95 the planet spirals towards its star an then spirals away from its star and the process seems to repeat itself forever so that the planet has harmonic motion.

I also observed how the planets would move if I just let them fall straight down. I found that if I just drop planets through their star using 1/r^2 they will move up an down repeatedly in the exact same way so that they have harmonic motion. I found that if I drop a planet through its star using 1/r^3 the gravity of the star accelerates the planet to escape velocity so that the planet shoots off into space rather than moving up and down through its star repeatedly. Interestingly some of the inverse laws that resulted in stable orbits did not result in harmonic motion when planets were dropped through their star. It was easy to get stable orbits with 1/r^2.5 but when I dropped planets through their star using this law they kept getting higher and higher each time they fell through until they stopped falling through their star.
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
anderscolingustafson
Tetronian
 
Posts: 312
Joined: Mon Mar 22, 2010 6:39 pm

Re: Planetary Simulation

Postby quickfur » Fri May 16, 2014 4:52 am

That's very interesting, I never thought to try non-integral inverse laws.

Having said that, though, the case of oscillation that increases in magnitude over time should be taken with a grain of salt: it looks like this simulation is done with floating-point arithmetic, which means some corner cases may exhibit catastrophic roundoff errors, and also, being a simulation, it is simulating a smooth path with discrete steps, so you should be aware that some of the results may be inaccurate due to accumulated roundoff errors. These accumulated roundoff errors may cause the energy of the system to increase over time instead of staying constant as it should. So the results should be taken with a grain of salt until they are rigorously verified.

But nevertheless, this is very interesting. Non-inverse law "gravity" is really not so much gravity, as some variant of the strong force, where the strength of the force actually increases with radius past a certain threshold. I'm not sure what to make of the fractional inverse laws, but it does produce fascinating results! Did you try 1/3.5r to see if stable orbits are also possible there? My suspicion is not, but you never know. Fractional powers can exhibit strange behaviour sometimes, that never happens with integral powers.
quickfur
Pentonian
 
Posts: 2435
Joined: Thu Sep 02, 2004 11:20 pm
Location: The Great White North

Re: Planetary Simulation

Postby Polyhedron Dude » Sat May 17, 2014 4:19 am

Interesting that r^-2.5 and vicinity are stable. I thought of an interesting possibility of 4-D gravitons that start off with their gravitational power held back and then releasing it as it travels, sort of like radioactive decay - in its first state it has very low gravity, but in its second state it has a higher gravity. This could produce a gravity field that has a variant, starting from r^-1 close to the star, increasing to r^-2 close to the habitable zone, and getting to r^-3 or higher further out (sort of wrecking it's Oort cloud).
Whale Kumtu Dedge Ungol.
Polyhedron Dude
Trionian
 
Posts: 187
Joined: Sat Nov 08, 2003 7:02 am
Location: Texas

Re: Planetary Simulation

Postby anderscolingustafson » Sat May 17, 2014 10:17 pm

I tried using 1/r^3.5 and it was even less stable than 1/r^3. It caused the planet to spiral in to its star much more violently than 1/r^3 did.
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
anderscolingustafson
Tetronian
 
Posts: 312
Joined: Mon Mar 22, 2010 6:39 pm

Re: Planetary Simulation

Postby Dreamwalker » Mon Jul 27, 2015 9:38 am

I am having way too much fun with the Gravity Simulator right now. :)
Gonna go tell a bunch of other people about it.

Personally I find r^0 fun. Gravity is the same regardless how far apart the planets are.
Have some good dreams.
But more importantly, have a good reality.
User avatar
Dreamwalker
Mononian
 
Posts: 8
Joined: Fri May 29, 2015 2:08 am
Location: Redmond, WA


Return to Programming

Who is online

Users browsing this forum: No registered users and 1 guest