Welcome, Guest

Author Topic: Different time steps = very different results in the same simulation  (Read 1923 times)

ngx

  • *
  • Posts: 3
Hello everyone,

I found a strange behaviour and I'm not sure whether it is a bug or I don't understand something correctly. If this topic was already discussed somewhere, please provide me with link.

I created a very simple simulation: Two stand still Earths, placed really close to each other, surface to surface a few km away. They fall on each other, melt and create final overheated body. However, final mass (and even temperature and radius) of that body varies significantly according to time step used. I think it is beyond accuracy divergence. For example:
- 10 min/sec, final mass is around 1.65 x Earth.
- 1 min/sec, final mass is around 1.14 x Earth.
- 1 sec/sec, final mass is around 1.03 x Earth (?!)

Automatic tolerance was used in all cases.

It is strange, I believe that final mas should be around 2 x Earth, probably a little less. I also think, that 1 sec/sec should provide best results possible, this looks as if it is opposite. Collisions of other planets work the same.

Also collision with higher time step is much more violent, with many debris fragments flying away, while 1 sec/sec is very calm and every single piece falls back to final body. It looks as if higher time step caused higher body velocity values used in simulation computations. I understand that different time steps should provide more-less the same (or simmilar) results, considering different accuracy errors of course, but anyway, smaller steps should be more accurate.

Please explain, thank you!

Physics_Hacker

  • *****
  • Posts: 427
Re: Different time steps = very different results in the same simulation
« Reply #1 on: January 03, 2018, 08:07:33 PM »
I suspect you weren't watching the whole entire time, because I know for a fact that some fragments (which carry mass) disappear after a certain amount of frames or computations and the closer to real time the time step is the more of these fragments disappear, and you couldn't have actively watched every single fragment so I'm sure this is what's causing that mass loss.

ngx

  • *
  • Posts: 3
Re: Different time steps = very different results in the same simulation
« Reply #2 on: January 04, 2018, 09:00:25 AM »
Hi Physics Hacker, thanx for the answer. I'm not sure what you mean by fragments disappearing. Of course I didn't watch them actively, I presume they fell back on Earth due to gravity pull. I watched several simulations for several times repeatedly for quite a long time. I let collision with 1 sec/sec time step running for 10+ hours.

As I understand physics, if two bodies, each with mass x merge (slowly enough to prevent half of their mass fly away as debris), the final mas is around 2x (definitely not 1.03x). I take US2 for physics simulator, that's why I ask about this discrepancy.

Another issue is, that differen time steps, especially if there is not a huge gap between them (like i.e. 1 sec/sec vs. 1 day/sec or so..) should not cause such a big difference in results. And also it seems that bigger time steps give better results, which is odd.

Physics_Hacker

  • *****
  • Posts: 427
ss of a planet, and it rounds down, you're again essntially losing mass,
« Reply #3 on: January 05, 2018, 07:30:30 PM »
The thing about fragments is that so many of them are created that some have to disappear (aka get dimmer until they can be deleted without notice) as if they were all kept your computer would show the sequence slow and slower and slower. more life-like time steps (closer to 1 sec/sec) give the computer more chance to create and delete fragments, but fragments carry mass away from the bodies so when they're deleted, so is the mass. Also to be considered is accuracy and rounding: if one fragment is smaller than the amount US2 will round a number to is lower than it would be considering the fragments mass, you're losing that/those fragments mass(es). All this happening over time, at least as far as I know, is probably the cause of this mass loss. If you do the simulation with fragments disabled, and my theory is correct, you'll find that the end mass is exactly 2 Earths. I'll test it...

Edit: Well, I got 1.02 Earth with a target timestep of 1.39 mins/sec with fragments on.
Did the same timestep and got 2.00 Earth.
« Last Edit: January 05, 2018, 07:45:33 PM by Physics_Hacker »

ngx

  • *
  • Posts: 3
Re: Different time steps = very different results in the same simulation
« Reply #4 on: January 06, 2018, 01:40:55 AM »
I've made a test, it worked exactly as you described. It all makes sense to me now. Maybe in future updates/releases the physics simulation will be even more precise and they will address this case too. Todo list is very promising. Thanx for your help!

Physics_Hacker

  • *****
  • Posts: 427
Re: Different time steps = very different results in the same simulation
« Reply #5 on: January 06, 2018, 11:37:27 AM »
Yeah, it is a bit odd not knowing that the fragments seemingly magically disappear but yeah, I too hope they fix this oddity at some point, or at least do something to counteract the untrue results. And, no problem :-)