File: henhei.ode

package info (click to toggle)
xppaut 5.85-3
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 11,552 kB
  • ctags: 7,725
  • sloc: ansic: 80,633; cpp: 965; makefile: 265
file content (12 lines) | stat: -rw-r--r-- 303 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
# henon-heiles 
# illustrates the use of the symplectic integrator
# try integration to 20000 with nout=100 and plot the energy
# try again with Runge-Kutta
x'=px
px'=-x-2*x*y
y'=py
py'=-y-x^2+y^2
aux e=.5*(px^2+py^2+x^2+y^2)+x^2*y-y^3/3
init x=.12,y=.12,px=.12,py=.12
@ total=200,dt=.166666,meth=y
done