# Error in N-Body simulation

by Einstein2nd
Tags: error, nbody, simulation
 P: 1,395 edguy99 is right, If you start the earth moving at speed v, and the sun motionless, there is an initial momentum of $m_{earth} v$, wich means you have a net drift of the center of mass by $$v \frac {m_{earth} } {m_{earth} + m_{sun}}$$ The orbit of the earth will drift as well, but the yearly drift is only $$2 \pi r \frac { m_{earth} } {m_{earth} + m_{sun}}$$ about (1/50000) AU The graph produced for the sun is a cycloid, a superposition of a rotation round the center of mass and a linear motion with (nearly) the same speed. You get the same graph if you graph the position of a point on the circumference of a rolling wheel.