finalproject

finalproject - Runge-Kutta Integrator You will write a...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Runge-Kutta Integrator You will write a Runge-Kutta integrator to calculate the evolution of an earth/sun system. Let the position of the the earth be ( x e ( t ) , y e ( t )) and the position of the sun be ( x s ( t ) , y s ( t )) . These variables satisfy the following system of second order equations, ¨ x e ¨ y e ¨ x s ¨ y s = ( Gm s ) / | r | 2 (- ˆ r x ) ( Gm s ) / | r | 2 (- ˆ r y ) ( Gm s ) / | r | 2 (ˆ r x ) ( Gm s ) / | r | 2 (ˆ r y ) where the two dots represent the second derivative with respect to t , G = 6 . 67 × 10- 11 Nm 2 / kg 2 is the gravitational constant, m e = 5 . 97 × 10 24 kg is the mass of the earth, m s = 1 . 99 × 10 30 kg is the mass of the sun, r is a vector from the sun to the earth, and ˆ r = r/ | r | . For the initial conditions, let the sun be located at the origin with zero velocity, and let the earth be located at (1 . 50 × 10 11 , 0) (the units are m) with velocity...
View Full Document

Ask a homework question - tutors are online