Sign in to follow this  
ilwG

very basic overview of possible integrators?

Recommended Posts

Hello, I would like a quick very basic overview of all the integrators (sp? right word?) out there. I'm talking about Euler, Verlet, RK4. I think Euler is this... (of course I could be wrong) ex: acceleration = acceleration + gravity + whateverElse; velocity = velocity + acceleration; position = position + velocity; I'm not sure about the others. I'm just looking for a quick overview and very basic explanation if anyone has a couple minutes to post. :) Thanks, - ilwG

Share this post


Link to post
Share on other sites
here's a list i made a few months ago, however I've only ever really used NSV so you might want to use this as a starting point for further research (i.e possibly some of these might be incorrect):


Euler
Aliases: Forward Euler, Explicit Euler
----------------------------------------
x = x + v * dt
v = v + a * dt

2nd Order Euler
----------------------------------------
x = x + v * dt + 0.5 * a * dt * dt
v = v + a * dt

Verlet
Aliases: Velocity-less Verlet
----------------------------------------
v = x - old_x + a * dt * dt
old_x = x
x = x + v


Time Corrected Velocity-less Verlet
----------------------------------------
v = (x - old_x) * (dt / old_dt) + a * dt * dt
old_x = x
x = x + v
old_dt = dt

Prescaled Euler
Aliases: Newton Stomer Verlet Variant
----------------------------------------
v = v + a * dt * dt
x = x + v

Re-ordered traditional Euler
Aliases: Semi-Implicit Euler, Newton Stormer Verlet, Backwards Euler
----------------------------------------
v = v + a * dt
x = x + v * dt

Velocity Verlet
----------------------------------------
x = x + v * dt + 0.5 * Old_A * dt * dt
v = v + 0.5 * (Old_A + a) * dt
Old_A = a

2nd Order Runge Kutta,
Aliases: Midpoint Method, RK2
----------------------------------------
k1 = dt * v
l1 = dt * a

k2 = dt * (v + k1 / 2)
l2 = dt * a

x = x + k2
v = v + l2

3rd Order Runge Kutta
Aliases: RK3
----------------------------------------
k1 = dt * v
l1 = dt * a

k2 = dt * (v + k1 / 2)
l2 = dt * a

k3 = dt * (v - k1 + 2 * k2)
l3 = dt * a

x = x + k1 * 1 / 6 + k2 * 2 / 3 + k3 * 1 / 6
v = v + l1 * 1 / 6 + l2 * 2 / 3 + l3 * 1 / 6

4th Order Runge Kutta
Aliases: RK4
----------------------------------------
k1 = dt * v
l1 = dt * a

k2 = dt * (v + k1 / 2)
l2 = dt * a

k3 = dt * (v + k2 / 2)
l3 = dt * a

k4 = dt * (v + k3)
l4 = dt * a

x = x + k1 / 6 + k2 / 3 + k3 / 3 + k4 / 6
v = v + l1 / 6 + l2 / 3 + l3 / 3 + l4 / 6

Share this post


Link to post
Share on other sites
Quote:
Original post by raigan
Re-ordered traditional Euler
Aliases: Semi-Implicit Euler, Newton Stormer Verlet, Backwards Euler
----------------------------------------
v = v + a * dt
x = x + v * dt


Other names are NSV, SGDI, SGDI1, symplectic... . I consider it rather impolite to name it after some person, when there are about 10000 people that invented it, and it's about as primitive as addition.

It's symplectic overshooting algorithm, that works excellently if you'd like to have simple environment. (It's precision is about 50 passes of an object through another one in 3 object n-body gravitational problem, then numerical error, double data type, would tear that simulation apart.)

It's also Poisson integrator for any Poisson systems with a separable Hamiltonian. Whatever that means.

So some comments to that list.

1. Do you know a VERY bad O(n^2) sorting algorithm? You could be kicked out if you'd implement it. You could be also kicked out if you implement this algorithm.

This algorithm is BAD.

2. Standard equation for a = constant.

3. While decent it has some issues.

4. Expanded version of previous, however it's, in most cases, unnecessary. (majority of working complex engines is better with fixed timestep, and possible sub recursion.)

5. It's decent algorithm.

6. I talked about it already.

Note that with fixed timestep both 5. and 6. collapse into one algorithm.

7. Didn't tested it.

8. RK4 family of algorithms tends to act as a low pass filter. Symplectic versions might be better, however I didn't tested them for that feature, and I don't like to look at pay for view sites, or look through some hard to read studies, where student/researcher thought the more math looking and more unreadable it will be, the more scientific work it would be.

There are also multistep methods like Adams method, and Stormer method.
Integrators with predictor, corrector step.
Hermite integrator.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this