|
|
>> As an aside, I tried to implement this on my laptop at the weekend, but
>> it was hopelessly unstable. Today it seems very stable indeed. I can
>> only assume this is to do with replacing Euler with 4th-order
>> Runge-Kutta. I'm surprised it makes quite this much of a difference
>> though...
>
> The stability region for linear problems is a bit larger*, not to mention the
> fact that it's, well, fourth order.
I still don't really comprehend why RK4 is different to just integrating
in smaller steps. (That's all the algorithm appears to do.) But hey,
whatever.
> Of course gravitation has ugly
> singularities, so it usually just seems to be the case that it doesn't blow up
> as badly as Euler near singularities.
I've removed the singularities. They make the thing wildly unstable no
matter what integration method you use.
Even so, with Euler I couldn't make it stable, no matter how tiny I set
the integration steps. (I mean, I was approaching the limit of
machine-precision arithmetic with how tiny the steps were.) RK4 manages
apparently total stability with really quite large integration steps,
which is puzzling.
> There are much more robust methods, though:
>
> http://tableau.stanford.edu/~mwest/group/Variational_Integrators
> http://tableau.stanford.edu/~mwest/full_text/LeMaOrWe2004.pdf
>
> * http://www.scholarpedia.org/article/Runge-Kutta_methods#Stability
Heh. If I understood any of that, maybe I'd agree with you. ;-)
Post a reply to this message
|
|