Universe Sandbox

Universe Sandbox => Universe Sandbox ² | Discussion => Topic started by: Greenleaf on September 10, 2014, 10:26:08 AM

Title: Numerical integration in Universe Sandbox ²
Post by: Greenleaf on September 10, 2014, 10:26:08 AM
This is a short demo of the integrators supported, and again available in 10.2
It is not an explanation about what numerical integration is or how it is done, though I have considered making a video about that as well, if people are interested.


http://youtu.be/IJ2MhXUDZ6o
Title: Re: Numerical integration in UniverseSandbox²
Post by: jbrown11 on September 10, 2014, 11:19:45 AM
This is a short demo of the integrators supported, and again available in 10.2
It is not an explanation about what numerical integration is or how it is done, though I have considered making a video about that as well, if people are interested.




Yeah i am interested.Not only will i be watching something cool i would be learning as well  ;)
You guys must know alot of maths :3
Title: Re: Numerical integration in UniverseSandbox²
Post by: WitheHole18 on September 10, 2014, 11:44:23 AM
cool, good job developers;)
Title: Re: Numerical integration in UniverseSandbox²
Post by: Plutonium on September 11, 2014, 12:31:52 AM
So the Accuracy slider is making the step smaller or changes the calculation model or both??
Title: Re: Numerical integration in UniverseSandbox²
Post by: Greenleaf on September 11, 2014, 02:43:45 AM
So the Accuracy slider is making the step smaller or changes the calculation model or both??


I didn't touch on the subject of adaptive integration, but yes, it makes the steps smaller.
As it is right now, the step size is based on the current acceleration, so with strong acceleration, you generally get strong curvature and that requires smaller steps.


This often works well and is fast, but in certain cases, the acceleration also changes quickly (change of acceleration over time is commonly called Jerk btw  ::)  ) and calculating the jerk was skipped for performance reasons, so those cases can become unstable.


As we speak, I am changing the current accuracy measurement to use the slightly more costly, but also more stable method of taking two small steps and one long step (for the same interval) and estimate truncation error based on the difference between those two results.


A reasonably basic, or at least very concrete, introduction can be found in http://mullinslab.ucsf.edu/Bethany/PHYS%20301/adaptive%20runge%20kutta.pdf


This method also has the benefit that you can more intuitively specify a required accuracy