English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

for example:Two light bodies in the orbit arround a much more massive one.You should be able to reproduce simple orbits.
-Two heavy bodies in close orbit with a light body orbiting them both .You can investigate the beheaviour of the light body as a function of its position relative to the heavy bodies.,and identify the lagrangian points.
You have to write the codes in matlab.

2007-02-11 10:35:11 · 1 answers · asked by gurpratap s 1 in Science & Mathematics Physics

1 answers

Assume a number of bodies of various masses are at various locations X1, Y1; X2, Y2 and so on, and moving at various velocities Vx1, Vy1; Vx2, Vy2 and so on.

Pick any one body and calculate the acceleration on it caused by the gravity of each of the other bodies, one by one, and then add them all up. To get the acceleration of body 1 due to the gravity of body 2 do this:

Calculate the distance to body 2 as R = SQRT((X1-X2)^2+(Y1-Y2)^2)
Calculate the acceleration A = GM / R where M is the mass of body 2 and G is the universal gravitational constant. The trick here is to get the X and Y components separately.
The answer is Ax = GM(X1-X2) / R^3 and Ay = (Y1-Y2) / R^3.

Do the same for all other bodies and add up all the Ax and Ay values.

Calculate the new velocity Vx1,Vy1 as Vx1 = Vx1 + Ax(total) and Vy1 = Vy1 + Ay(total).

Now do that again for each of the remaining bodies.

Calculate the new positions X,Y; X = X + Vx and Y = Y + Vy for all bodies.

Plot all the X,Y coordinates on a graph.

Repeat forever, or as long as you like.

2007-02-11 11:08:23 · answer #1 · answered by campbelp2002 7 · 0 0

fedest.com, questions and answers