Category : Science and Education
Archive   : ODE26.ZIP
Filename : BINARY.ODE

 
Output of file : BINARY.ODE contained in archive : ODE26.ZIP
# BINARY.ODE
# Planetary orbit in binary star system
# Plot x against y

# Use 5th order Runge-Kutta, auto step-size, 500 steps
$m 6
$n 500

#Solve to 20
$t 20

# (x,y) is position of the planet; (vx,vy) its velocity.
x = 1
y = 0
vx = 0
vy = 1.155, 1.160, 1.165 # notice sensitivity to initial values!

# Binary star centres are at (0,0) and (-5,0)
r13 = cub(sqrt(sqr(x)+ sqr(y)))
r23 = cub(sqrt(sqr(x+5)+sqr(y)))

x' = vx
y' = vy

# Newton's Law
vx' = -x/r13 - (x+5)/r23
vy' = -y/r13 - y/r23


  3 Responses to “Category : Science and Education
Archive   : ODE26.ZIP
Filename : BINARY.ODE

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/