Welcome, Guest

Author Topic: One thing I don't quite get...  (Read 6537 times)

Boopop

  • *
  • Posts: 1
One thing I don't quite get...
« on: May 05, 2011, 02:41:33 AM »
Hi,

I bought Universe Sandbox yesterday on Steam, and for the most part, I quite like it. One thing I don't get however is if I set the time fast enough, why do things orbiting always end up slingshotting past whatever it is they're orbiting? For example, if I run the solar system simulation at 60 days a step, by 2018, Mercury and Venus have already jumped out of the solar system, and are traveling into deep space. By 2046, Earth seems to have the same fate. What's going on? Are the calculations at this speed too rough and inaccurate or something?

Ramierez

  • **
  • Posts: 19
Re: One thing I don't quite get...
« Reply #1 on: May 05, 2011, 05:22:02 AM »
You pretty much nailed it...if you set the speed too high then sometimes the sim can't keep up and will result in slingshotting close orbitting objects.  Rings are even easier to throw around.

Bla

  • Global Moderator
  • *****
  • Posts: 1013
  • The stars died so you can live.
Re: One thing I don't quite get...
« Reply #2 on: May 05, 2011, 06:45:31 AM »
The time step is the time between every time the position of everything in the simulation is calculated.
If a planet orbits a star in 8 days, and you set the time step to 1 day, it will only make 8 calculations every orbit. Because of that, the orbit will have an unstable octogonal shape, and if the timestep is increased even further, it will be slingshot away.

How fast the time in the simulation appears to be going depends on the time step and how fast your computer is. The faster the time step is, the more inaccurate the simulation will be, but the faster time will pass. The faster your computer is, the faster time will pass without needing to increase the time step.

liko

  • *
  • Posts: 1
Re: One thing I don't quite get...
« Reply #3 on: May 05, 2011, 03:02:01 PM »
Hmm I'm slightly disappointed by this effect... Is there any way to correct it so for example I could see when voyager reaches a star without destroying our system? What about continuous calculation of the orbit? The gravity wells instead of orbits for example would simplify the model greatly and would allow to accurately model the dependencies between masses...

Dan Dixon

  • Creator of Universe Sandbox
  • Developer
  • *****
  • Posts: 3244
    • Personal Site
Re: One thing I don't quite get...
« Reply #4 on: May 05, 2011, 03:09:33 PM »
There's no way to get around the massive amount of computing power necessary to 'accurately' simulate gravity. This is a fundamental problem inherent to gravity simulators.

I'm not sure what you mean by: What about continuous calculation of the orbit?

It's true there are many opportunities for optimization of the code, but as far as I know, there's no way around this problem.

Akira Kenobi

  • *
  • Posts: 1
Re: One thing I don't quite get...
« Reply #5 on: May 08, 2011, 02:19:34 PM »
Hi Dan. I wasn't aware of this limitation when I bought the tool. Luckily I havent noticed this problem yet but I've only used it for a few minutes.

ANWAY, my suggestion was (if this doesn't already exist) a limiter that, if turned on, won't allow speed to be increased to a point where the simulation becomes badly inaccurate.

Also I imagine once the tool takes more advantage of multi core processors this problem might become a bit less common?

Anyway, great work so far.

Omnigeek6

  • *****
  • Posts: 111
Re: One thing I don't quite get...
« Reply #6 on: May 08, 2011, 05:17:22 PM »
Hi Dan. I wasn't aware of this limitation when I bought the tool. Luckily I havent noticed this problem yet but I've only used it for a few minutes.

ANWAY, my suggestion was (if this doesn't already exist) a limiter that, if turned on, won't allow speed to be increased to a point where the simulation becomes badly inaccurate.

Also I imagine once the tool takes more advantage of multi core processors this problem might become a bit less common?

Anyway, great work so far.

Setting the time step to "auto" might help. It will, I believe, automatically run the maximum stable speed. Look at what time it says in the little box after you set it on auto, and that will tell you how fast your current simulation can go. Beware, adding an object can change this speed limit.

bananasdoom

  • *
  • Posts: 3
Re: One thing I don't quite get...
« Reply #7 on: May 08, 2011, 09:23:19 PM »
Hmm I'm slightly disappointed by this effect... Is there any way to correct it so for example I could see when voyager reaches a star without destroying our system?
Make a save and then increase the speed then the solar system will be destroyed but you will see when voyager reaches a star  :D

Dwatson251

  • *
  • Posts: 5
Re: One thing I don't quite get...
« Reply #8 on: May 08, 2011, 11:38:24 PM »
I'm not sure what you mean by: What about continuous calculation of the orbit?

I think he means something like instead of calculating gravity on every frame, calculate it every real millisecond of something when it gets faster? I'm not sure how that's work, but I would love to speed things up sometimes without affecting the calculations.

I guess the speed is all affected against the frame rate you're getting, so a faster computer would mean a faster and more accurate simulation?

Dan Dixon

  • Creator of Universe Sandbox
  • Developer
  • *****
  • Posts: 3244
    • Personal Site
Re: One thing I don't quite get...
« Reply #9 on: June 09, 2011, 10:28:17 AM »
... I would love to speed things up sometimes without affecting the calculations.

Not really possible with a gravity simulator.

I guess the speed is all affected against the frame rate you're getting, so a faster computer would mean a faster and more accurate simulation?

Yes. A faster computer would run the same simulation (with the same time step) at a faster rate but with the same accuracy.