simulate the poynting–robertson effect in matlab

To simulate the Poynting-Robertson effect in MATLAB, we need to follow the below steps:

  1. Define the parameters of the simulation:

    • r: the radial distance of a dust particle from the Sun [m]
    • a: the semimajor axis of the particle's orbit [m]
    • e: the eccentricity of the particle's orbit
    • M: the mass of the Sun [kg]
    • c: the speed of light [m/s]
    • G: the gravitational constant [m^3/(kg*s^2)]
    • sigma: the radiation pressure coefficient
  2. Calculate the initial velocity of the particle using the vis-viva equation.

  3. Define the equations of motion for the particle:

    • r_dot: the rate of change of the radial distance of the particle
    • theta_dot: the rate of change of the particle's angular position
    • phi_dot: the rate of change of the particle's longitude of perihelion
    • v_dot: the rate of change of the particle's velocity
  4. Use MATLAB's numerical integrator (e.g. ode45()) to numerically solve the equations of motion over time.

  5. Plot the results to visualize the changes in the particle's orbit over time.

Here's an implementation of this simulation:

main.m
% Define simulation parameters
r = 1.5e11;     %m
a = 2*r;        %m
e = 0;          %eccentricity
M = 1.989e30;   %kg
c = 299792458;  %m/s
G = 6.674e-11;  %m^3/(kg*s^2)
sigma = 1;

% Calculate initial velocity
v = sqrt(G*M*(2/r - 1/a));

% Define equations of motion
f = @(t, Y) [Y(2); ...
             (1/Y(1)^2) - (G*M/Y(1)^3) + ((sigma*c)/Y(1)^2.5) * (Y(2)^2 + Y(3)^2); ...
             0; ...
             -((sigma*c)/(Y(1)^2.5)) * (Y(2)^2 + Y(3)^2)];
         
% Solve equations of motion numerically
[T, Y] = ode45(f, [0 1e13], [r v 0 0]);

% Plot results
plot3(Y(:,1).*cos(Y(:,3)), Y(:,1).*sin(Y(:,3)), zeros(size(Y, 1), 1), 'k-');
xlabel('x (m)');
ylabel('y (m)');
zlabel('z (m)');
691 chars
27 lines

This code simulates the orbit of a dust particle at a radial distance of r = 1.5e11 meters from the Sun, assuming that the particle has a circular orbit (e = 0) and initially has the same angular position as the Earth. The resulting orbit is plotted in 3D. However, note that this is a simplified simulation and neglects the effects of interplanetary dust dynamics, atmospheric drag, and other perturbations.

gistlibby LogSnag