Gravity Simulator http://www.orbitsimulator.com/cgi-bin/yabb/YaBB.pl General >> Discussion >> Couple of questions http://www.orbitsimulator.com/cgi-bin/yabb/YaBB.pl?num=1125185282 Message started by Nexus on 08/27/05 at 16:28:01

 Title: Couple of questions Post by Nexus on 08/27/05 at 16:28:01 Hey Tony,Great program. I've been looking for a decent gravity simulator for ages and this is the first I've found that doesn't suck. Couple of questions from a novice user1) How do I make the program view the system edge on? When I make a solar syatem and give the planets inclination 0, it looks at the system from the top. But in onlyplanets.gsim the planets have inclinations of about zero and I see the system edge on. How do I do that in my simulations?2) When two bodies collide, how does the program work out the diameter of the merged object?3) How do I create an object with a hyperbolic orbit?Cheers,Nexus

 Title: Re: Couple of questions Post by Nexus on 08/29/05 at 14:25:02 Thanks. I'll have to fiddle with this.

 Title: Re: Couple of questions Post by Gwenafri on 10/08/05 at 03:08:34  I created a planetary system with a 3rd planet very much like Earth, except with 2 moons.  I noticed that the point where the year changes from 1 to the next happens a little earlier with each trip around the sun.  Is there any way to correct this, or am I misunderstanding how that works?  I know very little about this kind of stuff and I'm terrible at math.   I love the program though-it's fun to see what happens if...               Gwenafri

 Title: Re: Couple of questions Post by Tony on 10/08/05 at 10:24:11 What is the mass of your star?  What is the mass of your planet?  What is the semi-major axis of your planet?  How massive are your moons?  What time step are you using?All these will affect your period.  The Earth orbits the Sun in exactly 1 year... almost.  There are small changes in the length of the year that make the actual orbital period differ from the calendar year.  But thanks to the leap year system, which Gravity Simulator accounts for, it would take a few thousand years to add to anything significant.If you create a planet with a semi-major axis of exactly 1 AU from a star with exactly 1 solar mass, you should get an orbit of exactly 1 year.  But if you create a moon around the planet, things change.  Now the important thing is the barycenter of the system.  Adding the moon changes both the barycenter's position and velocity, which will affect the period.  This should be negligable if your moons are not very massive, but it's fun to make binary and triple planets.Also, the time step you use can have an effect.  If you run the simulation too fast, things get out of wack quickly.  If you keep your time step at or below 16384 you should get good results assuming your moons don't orbit too close to the planet.  Otherwise, try a slower time step.

 Title: Re: Couple of questions Post by Gwenafri on 11/01/05 at 12:00:21 Thanks, that explains things.       Gwenafri

 Title: Re: Couple of questions Post by tomek on 05/15/06 at 05:08:14 hey tony! couple more questions herefirst - in the description of moonbuilder simulaton, it says "All collisions are elastic collisions, where the kinetic energy of the moonlets is conserved". how comes that? i though it's a classic example of non-elastic collision; energy is never conserved in such cases. momentum (m*v) should be conserved instead. or am i missing something?second - i noticed that in simulations showcasing some saturn moons (dione for instance), you're just focusing on saturn; but scenario actually has a whole sol in it - including TPOs, asteroids, comets and stuff. for what hell are THOSE in there? they're just slowing down the simulation and good at that...

 Title: Re: Couple of questions Post by Tony on 05/16/06 at 19:13:58 I used to get those terms mixed up when I took physics.  I'll look into it.  You might be right.Feel free to delete any unnecessary objects from the simulation.  It's easy to run the Saturn simulations too fast, so the extra objects slowing it down doesn't bother me.  At a minimum, you should keep the Sun.

 Title: Re: Couple of questions Post by tomek on 05/18/06 at 00:06:28 i just ran a couple of quick tests, and it seems like you are actually conserving the right thing, mistake being in moonbuilder's descriptionas for the scenario, well i'm just sort of suggesting that it would be better not to include unnecessary objects in the simulation from the beginning. why should i keep the sun though? i just deleted it and nothing special happened...

 Title: Re: Couple of questions Post by Tony on 05/18/06 at 09:51:18 The Sun sets the Hill Sphere radius of the system.  Notice that the outer moons act chaotically with the Sun in the simulation.  That is to say that if you run the simulation long enough, they don't trace the same orbit over and over again.  But if you eliminate the Sun, expanding Saturn's Hill Sphere to infinity, the outer moons, such as Phoebe, orbit in nice predictable ellipses, tracing the same orbit over and over again.  In fact, there's no reason Saturn couldn't have a moon orbiting it from 1 light year away if its Hill Sphere is infinite. Try it at time step 1024.  This timestep will destabalize your inner moons, but its fine for the outer moons.

Title: Re: Couple of questions
Post by Nexus on 11/29/06 at 02:08:59

Tony wrote:
 2.  I'm going to re-do this code because there's a bug that sometimes shows up when objects of different densities merge.  But for bodies of the same density it works fine.  Basically it works like this: From the size and mass of a body it determines its density.  When two bodies collide, it computes their combined average density.  This will be the density of the new object.  From its density and mass it computes its volume, and from volume it computes its radius.

Sorry to dredge this thread up again, but I think I have a good solution to this problem: just add the volumes of the two objects together. Don't bother faffing about with densities.

Let me explain why by using an extreme example. Suppose you have two objects of equal mass: a big ball of whipped cream and a ball-bearing. If you drop the ball-bearing into the whipped cream you do not expect to end up with something smaller than the whipped-cream ball. It should be very slightly bigger.

 Title: Re: Couple of questions Post by Tony on 11/30/06 at 22:09:23 That's not a bad idea.  Its easier and it makes more sense.