Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

5 . 2 . 3 Gravitational systems The motion of n planets ( P 0 , P 1 , dots, P n - 1 )

5.2.3 Gravitational systems
The motion of n planets (P0,P1,dots,Pn-1) is governed by the set of 6n first order ODEs
ri'=vi, and ,vi'=j=1jinGmjrj-ridij3
where mi,ri(t) and vi(t) are the mass, position vector and velocity of the planet Pi, respectively. The scalar dij=dji=||rj-ri|| is the distance between the two planets Pi and Pj. The gravitational constant, G, can be taken equal to 1 without loss of generality.
5.2.3.1 The two-body problem
Two point particles (or two planetary bodies) interacting only with each other under Newton's laws of gravitational attraction are well understood and the equation of motion can be integrated analytically. However, here, the trajectories of the two planets will be computed numerically.
(1) Write down, in vector form, the four ODEs governing the motion of the two planets interacting gravitationally. (If written in component form, these four equations would give 12 equations.)
(2) Write a Python function two_body(x) which returns the vector f(x), as defined in (5.1), for the two-body problem. The NumPy array x must be of size 12, and its shape must be 2,2,3. For the entry x[i,j,k],i=0,1 corresponds to the first or second planet; j=0,1 corresponds to the position vector or the velocity of the planet considered; and k=0,1,2 corresponds to the x,y or z component of the vector (position or velocity). You can assume that the masses of the planets, m0 and m1, are defined outside the function two_body.
(3) Consider two planets, P0 and P1, of mass m0=1 and m1=2, respectively. At time t=0,P0 is at r0=(1,0,0) with velocity v0=(0,12,0) and P1 is at r1=(-1,0,0) with velocity v1=(0,-14,0). The trajectories of the two planets are periodic and remain in the (x,y)-plane. Solve the equations of motion numerically, using your function rk4, then plot the complete orbits of the two planets.
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Students also viewed these Databases questions

Question

=+57. Consider the RyanJoiner test for population normality.

Answered: 1 week ago