Download as pdf or txt
Download as pdf or txt
You are on page 1of 7

Planetary Motion

Simulation of Physical Process.

F. A. Velázquez-Muñoz

Physics Department
University of Guadalajara.

October 28, 2015

Simulation of Physical Process. F. A. Velázquez-Muñoz Physics DepartmentUniversity


Planetary Motion of Guadalajara.
Overview

Simulation of Physical Process. F. A. Velázquez-Muñoz Physics DepartmentUniversity


Planetary Motion of Guadalajara.
Leyes de Kepler
First All planetary orbits are ellipses, with the Sun at the focus.
Second The line joining the planets to the Sun sweeps out equal areas
in equal times
Third The square of the period of the planet is proportional to the
cube of its mean distance to the Sun.

Simulation of Physical Process. F. A. Velázquez-Muñoz Physics DepartmentUniversity


Planetary Motion of Guadalajara.
The Gravitational Attraction Force
m1 m2
F =G (1)
r2
where G is the constant of universal gravitation and its value is
G = 6.670 × 10−11 Nm2 Kg −2 .

Simulation of Physical Process. F. A. Velázquez-Muñoz Physics DepartmentUniversity


Planetary Motion of Guadalajara.
function dos cuerpos 2D
clc
global G ms
%Tierra
G = 6.67000E−11; %[ N (m/kg)ˆ2]
ra = 1.52000E+11; %[m]
ra = 1.49000E+11; %[m]
va = 2.983995002424877e+04; %[m/s]
mt = 5.97219E+24; %[kg]
ms = 1.98910E+30; %[kg]
t = [ 0 2*365*(86400+6*60)];
th=45;
x = [ra*cosd(th) −va*sind(th) ra*sind(th) va*cosd(th)];
[tp,xp]=ode45(@fun,t,x);

Simulation of Physical Process. F. A. Velázquez-Muñoz Physics DepartmentUniversity


Planetary Motion of Guadalajara.
figure(1)
for k=1:size(xp,1)
clf
plot(0,0,'*y','MarkerSize',20,'LineWidth',3)
hold on
plot(xp(:,1),xp(:,3),'−−w')
hold on
axis equal
axis([−2*ra 2*ra −2*ra 2*ra])
plot(xp(k,1),xp(k,3),'.b','MarkerSize',30)
set(gca,'Color',[0.1 0.1 0.1]);
drawnow
end

Simulation of Physical Process. F. A. Velázquez-Muñoz Physics DepartmentUniversity


Planetary Motion of Guadalajara.
function [xp]=fun(t,x)
global G ms
r=sqrt(x(1).ˆ2+x(3).ˆ2);
xp=zeros(4,1);
xp(1)= x(2);
xp(2)= −G.*ms.*x(1)./(rˆ3);
xp(3)= x(4);
xp(4)= −G.*ms.*x(3)./(rˆ3);

Simulation of Physical Process. F. A. Velázquez-Muñoz Physics DepartmentUniversity


Planetary Motion of Guadalajara.

You might also like