0
$\begingroup$

I'm working on a programming homework working with a system of point masses/particles. We are given the particles' initial positions (s_x, s_y, s_z), initial velocities (v_x, v_y, v_z) and masses. Using this information, we are supposed to create an output file that has the particles' positions after a set time delta_t as they orbit each other over a given time period (I'm assuming they would end up orbiting the system's center of mass, is this assumption correct?).

I've been stuck for hours trying to figure out the physics of my problem. I have written functions to find the system's center of mass and the net gravitational force experienced by each particle given all of the velocities, positions and masses in the system, but I don't know where to go from there :/.

I know I need to figure out how to get each particles position, velocity and force after a given delta_t time period. I have the force covered, but I don't know how the position would change and even less the velocity.

I figured I could first get the net gravitational force and then use that along with centripetal acceleration to find out the new velocity? or is this how I get the displacement of the particle? Ugh, I'm pretty clueless right now :(.

Help please!

$\endgroup$
3
$\begingroup$

This is a standard numerical integration problem.

The simplest solution is the Euler method. At each time-step you update the position $$ x(t+\delta t) = x(t) + v(t)\delta t $$ and the velocity $$ v(t+\delta t) = v(t) + F(x(t))\delta t/m $$ for each particle, where $F$ is the force acting on the particle and $m$ its mass.

A more advanced method is Verlet integration which is more stable than the Euler method and therefore allows you to use larger time-steps.

Note that there is no need to explicitly compute the centre of mass.

| cite | improve this answer | |
$\endgroup$
  • $\begingroup$ Would the equations for constant acceleration $$v(t+\delta t) = v(t) + a \delta t $$ and $$ x(t+\delta t) = x(t) + v(t)\delta t + (1/2) a \delta t^2$$ work as well? $\endgroup$ – Morg Man Apr 4 '15 at 21:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.