OrdinaryDiffEqSymplecticRK
A symplectic integrator is an integrator whose solution resides on a symplectic manifold. Because of discretization error, when it is solving a Hamiltonian system it doesn't get exactly the correct trajectory on the manifold. Instead, that trajectory itself is perturbed O(Δtn) for the order n from the true trajectory. Then there's a linear drift due to numerical error of this trajectory over time Normal integrators tend to have a quadratic (or more) drift, and do not have any good global guarantees about this phase space path (just local). What means is that symplectic integrators tend to capture the long-time patterns better than normal integrators because of this lack of drift and this almost guarantee of periodicity.
Installation
To be able to access the solvers in OrdinaryDiffEqSymplecticRK, you must first install them use the Julia package manager:
using Pkg
Pkg.add("OrdinaryDiffEqSymplecticRK")This will only install the solvers listed at the bottom of this page. If you want to explore other solvers for your problem, you will need to install some of the other libraries listed in the navigation bar on the left.
Example usage
using OrdinaryDiffEqSymplecticRK
function HH_acceleration!(dv, v, u, p, t)
x, y = u
dx, dy = dv
dv[1] = -x - 2x * y
dv[2] = y^2 - y - x^2
end
initial_positions = [0.0, 0.1]
initial_velocities = [0.5, 0.0]
tspan = (0.0, 1.0)
prob = SecondOrderODEProblem(HH_acceleration!, initial_velocities, initial_positions, tspan)
sol = solve(prob, KahanLi8(), dt = 1 / 10)Full list of solvers
OrdinaryDiffEqSymplecticRK.SymplecticEuler — TypeSymplecticEuler()Symplectic Runge-Kutta Methods First order explicit symplectic integrator.
Keyword Arguments
References
https://en.wikipedia.org/wiki/Semi-implicitEulermethod
OrdinaryDiffEqSymplecticRK.VelocityVerlet — TypeVelocityVerlet()Symplectic Runge-Kutta Methods 2nd order explicit symplectic integrator. Requires f_2(t,u) = v, i.e. a second order ODE.
Keyword Arguments
References
@article{verlet1967computer, title={Computer" experiments" on classical fluids. I. Thermodynamical properties of Lennard-Jones molecules}, author={Verlet, Loup}, journal={Physical review}, volume={159}, number={1}, pages={98}, year={1967}, publisher={APS} }
OrdinaryDiffEqSymplecticRK.VerletLeapfrog — TypeVerletLeapfrog()Symplectic Runge-Kutta Methods 2nd order explicit symplectic integrator. Kick-drift-kick form. Requires only one evaluation of f1 per step.
Keyword Arguments
References
@article{monaghan2005, title = {Smoothed particle hydrodynamics}, author = {Monaghan, Joseph J.}, year = {2005}, journal = {Reports on Progress in Physics}, volume = {68}, number = {8}, pages = {1703–1759}, doi = {10.1088/0034-4885/68/8/R01}, }
OrdinaryDiffEqSymplecticRK.LeapfrogDriftKickDrift — TypeLeapfrogDriftKickDrift()Symplectic Runge-Kutta Methods 2nd order explicit symplectic integrator. Drift-kick-drift form of VerletLeapfrog designed to work when f1 depends on v. Requires two evaluation of f1 per step.
Keyword Arguments
References
@article{monaghan2005, title = {Smoothed particle hydrodynamics}, author = {Monaghan, Joseph J.}, year = {2005}, journal = {Reports on Progress in Physics}, volume = {68}, number = {8}, pages = {1703–1759}, doi = {10.1088/0034-4885/68/8/R01}, }
OrdinaryDiffEqSymplecticRK.PseudoVerletLeapfrog — TypePseudoVerletLeapfrog()Symplectic Runge-Kutta Methods 2nd order explicit symplectic integrator.
Keyword Arguments
References
@article{verlet1967computer, title={Computer" experiments" on classical fluids. I. Thermodynamical properties of Lennard-Jones molecules}, author={Verlet, Loup}, journal={Physical review}, volume={159}, number={1}, pages={98}, year={1967}, publisher={APS} }
OrdinaryDiffEqSymplecticRK.McAte2 — TypeMcAte2()Symplectic Runge-Kutta Methods Optimized efficiency 2nd order explicit symplectic integrator.
Keyword Arguments
References
@article{mclachlan1992accuracy, title={The accuracy of symplectic integrators}, author={McLachlan, Robert I and Atela, Pau}, journal={Nonlinearity}, volume={5}, number={2}, pages={541}, year={1992}, publisher={IOP Publishing} }
OrdinaryDiffEqSymplecticRK.Ruth3 — TypeRuth3()Symplectic Runge-Kutta Methods 3rd order explicit symplectic integrator.
Keyword Arguments
References
@article{ruth1983canonical, title={A canonical integration technique}, author={Ruth, Ronald D}, journal={IEEE Trans. Nucl. Sci.}, volume={30}, number={CERN-LEP-TH-83-14}, pages={2669–2671}, year={1983}}
OrdinaryDiffEqSymplecticRK.McAte3 — TypeMcAte3()Symplectic Runge-Kutta Methods Optimized efficiency 3rd order explicit symplectic integrator.
Keyword Arguments
References
@article{mclachlan1992accuracy, title={The accuracy of symplectic integrators}, author={McLachlan, Robert I and Atela, Pau}, journal={Nonlinearity}, volume={5}, number={2}, pages={541}, year={1992}, publisher={IOP Publishing} }
OrdinaryDiffEqSymplecticRK.CandyRoz4 — TypeCandyRoz4()Symplectic Runge-Kutta Methods 4th order explicit symplectic integrator.
Keyword Arguments
References
@article{candy1991symplectic, itle={A symplectic integration algorithm for separable Hamiltonian functions}, uthor={Candy, J and Rozmus, W}, ournal={Journal of Computational Physics}, olume={92}, umber={1}, ages={230–256}, ear={1991}, ublisher={Elsevier}}
OrdinaryDiffEqSymplecticRK.McAte4 — TypeMcAte4()Symplectic Runge-Kutta Methods 4th order explicit symplectic integrator. Requires quadratic kinetic energy.
Keyword Arguments
References
@article{mclachlan1992accuracy, title={The accuracy of symplectic integrators}, author={McLachlan, Robert I and Atela, Pau}, journal={Nonlinearity}, volume={5}, number={2}, pages={541}, year={1992}, publisher={IOP Publishing} }
OrdinaryDiffEqSymplecticRK.CalvoSanz4 — TypeCalvoSanz4()Symplectic Runge-Kutta Methods Optimized efficiency 4th order explicit symplectic integrator.
Keyword Arguments
References
@article{sanz1993symplectic, title={Symplectic numerical methods for Hamiltonian problems}, author={Sanz-Serna, Jes{'u}s Maria and Calvo, Mari-Paz}, journal={International Journal of Modern Physics C}, volume={4}, number={02}, pages={385–392}, year={1993}, publisher={World Scientific} }
OrdinaryDiffEqSymplecticRK.McAte42 — TypeMcAte42()Symplectic Runge-Kutta Methods 4th order explicit symplectic integrator. BROKEN
Keyword Arguments
References
@article{mclachlan1992accuracy, title={The accuracy of symplectic integrators}, author={McLachlan, Robert I and Atela, Pau}, journal={Nonlinearity}, volume={5}, number={2}, pages={541}, year={1992}, publisher={IOP Publishing} }
OrdinaryDiffEqSymplecticRK.McAte5 — TypeMcAte5()Symplectic Runge-Kutta Methods Optimized efficiency 5th order explicit symplectic integrator. Requires quadratic kinetic energy.
Keyword Arguments
References
@article{mclachlan1992accuracy, title={The accuracy of symplectic integrators}, author={McLachlan, Robert I and Atela, Pau}, journal={Nonlinearity}, volume={5}, number={2}, pages={541}, year={1992}, publisher={IOP Publishing} }
OrdinaryDiffEqSymplecticRK.Yoshida6 — TypeYoshida6()Symplectic Runge-Kutta Methods 6th order explicit symplectic integrator.
Keyword Arguments
References
@article{yoshida1990construction, title={Construction of higher order symplectic integrators}, author={Yoshida, Haruo}, journal={Physics letters A}, volume={150}, number={5-7}, pages={262–268}, year={1990}, publisher={Elsevier}}
OrdinaryDiffEqSymplecticRK.KahanLi6 — TypeKahanLi6()Symplectic Runge-Kutta Methods Optimized efficiency 6th order explicit symplectic integrator.
Keyword Arguments
References
@article{yoshida1990construction, title={Construction of higher order symplectic integrators}, author={Yoshida, Haruo}, journal={Physics letters A}, volume={150}, number={5-7}, pages={262–268}, year={1990}, publisher={Elsevier}}
OrdinaryDiffEqSymplecticRK.McAte8 — TypeMcAte8()Symplectic Runge-Kutta Methods 8th order explicit symplectic integrator.
Keyword Arguments
References
@article{mclachlan1995numerical, title={On the numerical integration of ordinary differential equations by symmetric composition methods}, author={McLachlan, Robert I}, journal={SIAM Journal on Scientific Computing}, volume={16}, number={1}, pages={151–168}, year={1995}, publisher={SIAM} }
OrdinaryDiffEqSymplecticRK.KahanLi8 — TypeKahanLi8()Symplectic Runge-Kutta Methods Optimized efficiency 8th order explicit symplectic integrator.
Keyword Arguments
References
@article{kahan1997composition, title={Composition constants for raising the orders of unconventional schemes for ordinary differential equations}, author={Kahan, William and Li, Ren-Cang}, journal={Mathematics of computation}, volume={66}, number={219}, pages={1089–1099}, year={1997}}
OrdinaryDiffEqSymplecticRK.SofSpa10 — TypeSofSpa10()Symplectic Runge-Kutta Methods 10th order explicit symplectic integrator.
Keyword Arguments
References
@article{sofroniou2005derivation, title={Derivation of symmetric composition constants for symmetric integrators}, author={Sofroniou, Mark and Spaletta, Giulia}, journal={Optimization Methods and Software}, volume={20}, number={4-5}, pages={597–613}, year={2005}, publisher={Taylor \& Francis}}