Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Asteroid Trajectory Equations?

  1. Dec 9, 2006 #1
    1. The problem statement, all variables and given/known data
    I need to know how to apply the coefficent of friction and gravity to a 3-coordinate (3D) velocity vector.

    For my Intro to C Programming class, our final project is to write a program that simulates the trajectory of an asteroid passing a gas giant. The problem is, I haven't taken college Physics and this goes way, way beyond high school physics. I also have a limited understanding of Calculus (just barely passing Calc 1 right now). Here is the assignment:

    Thanks in advance for the help. I think I am being clear enough, but I have been studying for finals all day and my brain is almost fried. Please let me know if I need to specify things further.
  2. jcsd
  3. Dec 9, 2006 #2
    I forgot to mention in my previous post that the physics side of this is not what is being graded, it is implimenting the physics into a program.
  4. Dec 10, 2006 #3


    User Avatar
    Homework Helper

    I get the impression that the Physics is not of a high standard in this project.

    Lets try and clear the acceleration due to the gravitational attraction up first.

    What other info regarding the gravitational attraction is given?

    From your post above I get the impression that you should assume that the asteroid is experiencing a constant acceleration due to the attraction of the gas gaint all the way [0.0,10.0], that is even when the asteriod is inside of the gas gaint.
  5. Dec 10, 2006 #4
    I have done a little research on the matter and I remember a bit from my highschool Physics class. He is wanting us to use the inverse square law for gravity.
    The problem is, the gas giant doesn't have a radius, simply an atmosphere that is 1.0 units around it's center. Maybe I am confused and it's atmosphere is supposed to be the radius of the planet?

    Also, I have no idea how to apply a coefficient of friction. Would it be:
    [tex]F_f = \mu N[/tex]
    [tex]\mu[/tex] is the coefficient of friction.
    [tex]N[/tex] is the normal force to the contact surface.
    [tex]F_{f}[/tex] is the maximum possible force exerted by friction.

    How would I apply that to an object moving through space?

    And the last thing I need to know, how do I apply this to a 3 coordinate model?
    Last edited: Dec 10, 2006
  6. Dec 10, 2006 #5


    User Avatar
    Staff Emeritus
    Science Advisor
    Gold Member

    The r is not the necessarily the radius of the body. It is the displacement of asteroid from the centre of mass of the gas the giant.
  7. Dec 10, 2006 #6
    I think in this case, since the force due to gravity is always directed towards the center of the gas giant, the path followed by it is part of a sphere. If we figure out how to do it in 2D, then the 3D version should be easy.
  8. Dec 10, 2006 #7
    If you take, in the 2D model, the initial velocity of the asteroid to be inclined at an angle 'theta' to the x-axis, then the horizontal force acting on the asteroid is F(g) sin(theta) and the vertical force is -F(g) cos(theta) (i.e. in the -y direction).

    However, if the mass of the asteroid is negligible, then how are you supposed to find the acceleration? Because, for a negligible mass, the acceleration should be infinity.
  9. Dec 10, 2006 #8


    User Avatar
    Staff Emeritus
    Science Advisor
    Gold Member

    Are you sure about that?
  10. Dec 10, 2006 #9
    For when the asteroid is outside the atmosphere, the equations for the trajectory in 2D are:

    [tex]x(t)= -x+vcos(theta)+ (1/2)[F(g) sin(theta)/m]t^2[/tex]
    y(t)= v sin(theta) - 0.5[F(g) cos(theta)/m]t^2 [/tex]

    where F(g) is force due to gravity and m is the mass of the asteroid and -x represents the initial position of the asteroid assuming it starts from the left of the gas giant and moves towards the right
    Last edited: Dec 10, 2006
  11. Dec 10, 2006 #10
    Shouldnt it?
  12. Dec 10, 2006 #11


    User Avatar
    Staff Emeritus
    Science Advisor
    Gold Member

    Nope, the acceleration of an object in a gravitational field is independent of the object's mass.
  13. Dec 10, 2006 #12
    Im sorry, I didnt know that. What should the acceleration be?
  14. Dec 10, 2006 #13


    User Avatar
    Staff Emeritus
    Science Advisor
    Gold Member

    The acceleration of an object is given by Newton's second law, F = ma. Now, the force acting on an object in a gravitational field (ignoring friction etc.) is given by Newton's law of gravitation. Therefore, we can equate the two equations;

    [tex]F = \frac{GMm}{r^2} = ma[/tex]

    Notice that the m (mass of the object) cancel leaving;

    [tex]a = \frac{GM}{r^2}[/tex]

    Just as fmucker posted :wink:
  15. Dec 10, 2006 #14
    :D Im sorry... I completely overlooked that...
  16. Dec 10, 2006 #15


    User Avatar
    Staff Emeritus
    Science Advisor
    Gold Member

    No problem, don't let it discourage you from helping though since "While we teach, we learn" :wink:
  17. Dec 10, 2006 #16
    Now, as frictional force opposes the tendency of motion, I think it should act in the opposite direction of the gravitational force.... I dont know how you'll factor in the coeff. of friction though...
  18. Dec 10, 2006 #17
    I think I am starting to understand how to factor in gravity. I use the function:
    [tex]g=\frac{GM}{r^2}[/tex] and then use [tex]F_{g} =sin(\theta)[/tex] for x coordinate and [tex]-F_{g} =cos(\theta)[/tex] for y? If I am correct with this, I can program most of it and work in coef of friction when I get that figured out.
  19. Dec 10, 2006 #18
    Err, maybe [tex]F_{a} =F_{g} sin(\theta)[/tex] and [tex]F_{a}=-F_{g} cos(\theta)[/tex] ?
  20. Dec 10, 2006 #19
    No, as I gather, here [tex]a_x=\frac{GM}{r^2}sin(\theta)[/tex] and
    [tex]a_y=-\frac{GM}{r^2}cos(\theta)[/tex]. If youre programming in C++, maybe I can help you...
  21. Dec 10, 2006 #20


    User Avatar
    Science Advisor
    Homework Helper

    The friction acts in a direction to oppose the motion, not the acceleration. It would be opposite gravity only if the object were headed directly toward the center of the gas giant.
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook