Get from Ico-github-logo

Highlights from
RKN1210 - A 12th/10th order Runge-Kutta-Nyström integrator

4.5

4.5 | 2 ratings Rate this file 22 Downloads (last 30 days) File Size: 34.6 KB File ID: #25291
image thumbnail

RKN1210 - A 12th/10th order Runge-Kutta-Nyström integrator

by

 

11 Sep 2009 (Updated )

Integrator for second-order ODE's with very stringent error tolerances.

| Watch this File

File Information
Description

RKN1210 12th/10th order Runge-Kutta-Nyström integrator
RKN1210() is a 12th/10th order variable-step numerical integrator for ordinary differential equations of the form
      y'' = f(t, y) (1)

with initial conditions

      y(t0) = y0, y'(t0) = yp0 (2)

This second-order differential equation is integrated with a Runge-Kutta-Nyström method using 17 function evaluations per step. RKN12(10) is a very high-order method, to be used in problems with *extremely* stringent error tolerances.

The RKN-class of integrators is especially suited for problems of type (1). Compared to a classic Runge-Kutta integration scheme, the same accuracy can be obtained with fewer function evaluations. Also, it has been shown in various studies that this particular integration method is overall more efficient than (symplectic) multi-step or extrapolation methods that give the same accuracy.

RKN1210's behavior is very similar MATLAB's ODE-integrator suite; you can set options via ODESET, and input and output values are also practically the same.

Both output functions and event functions are fully supported.

The construction of RKN12(10) is described in
High-Order Embedded Runge-Kutta-Nyström Formulae
J. R. DORMAND, M. E. A. EL-MIKKAWY, AND P. J. PRINCE
IMA Journal of Numerical Analysis (1987) 7, 423-430

Coefficients obtained from
http://www.tampa.phys.ucl.ac.uk/rmat/test/rknint.f
These are also available in any format on request to these authors.

If you find this work useful and want to show your appreciation:
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=6G3S5UYM7HJ3N

MATLAB release MATLAB 7.10 (R2010a)
Other requirements ODE suite, for ODESET() and ODEGET() (standard MATLAB)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (6)
05 Nov 2013 Rody Oldenhuis

@Sammy Olivaw I uploaded today, so should be tomorrow or so.

05 Nov 2013 Sammy Olivaw

@Rody Oldenhuis Thank you! This integrator is really good. Any idea when the update will be up?

05 Nov 2013 Rody Oldenhuis

@Sammy Olivaw: In principle, yes. There was a bug relating to this issue, but this has been fixed with the pending update.

05 Nov 2013 Sammy Olivaw

Does it support integrating backward in time? (ex: tSpan = linspace(0, -10);)

18 Mar 2012 Rody Oldenhuis

@Tarek: thank you for the heads up, it has been corrected and a fixed version will be up as soon as they've approved it!

14 Mar 2012 Tarek

There seems to be a bug when using tspan as a vector to display results at certain time steps. An error message is generated for the index of tout as
Undefined function or variable "index".

Error in ==> rkn1210>finalize at 768
tout = tout (1:index,:);

The codes works fine with specifying tspan as [t0 tf]

Updates
14 Jan 2010

- Interactive demonstration included
- implemented support for event functions
  and output functions
- corrected various bugs, most notably the
  (incorrectly) flipped output when tspan(2) < tspan(1)
- improved error handling

28 Oct 2010

- Fixed 2 bugs: 1) exitflag = 3 was never assigned or described in the argument [output] 2) intermediate results were erased by event functions and only the event's zero was returned
- Improved performance a bit by pre-assigning the output arrays

19 Feb 2011

- Removed bug inherited from RKN86; the error estimates there were all wrong. Now RKN1210 integrates at least 50x faster!
- Updated demo; included Earth+J2 example.

18 Mar 2012

bugfix for missing "index" variable on numel(tspan)>2 as noted by Tarek

11 Jun 2013

Improvements regarding performance and memory usage.

05 Nov 2013

- Fixed 2 bugs (thanks everyone!)
- Corrected & improved error handling
- It should be possible to use RKN1210 on R2008a and up
- Improved memory performance a tad
- Small stylistic updates to demo
      

18 Nov 2013

- Found & removed some stray debugging code
- Corrected name & doc (ö instead of o)

14 Feb 2014

- Misc. bugfixes (minor)
- Implemented support for deval(). Note that MATLAB built-in deval() does not support rkn1210; a customized version is in the making.

03 Jul 2014

fixed divide-by-zero error for isolated cases where f turns all-zero

Contact us