# Asteroid Trajectory Equations?

1. Dec 9, 2006

### fmucker

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. Dec 9, 2006

### fmucker

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.

3. Dec 10, 2006

### andrevdh

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.

4. Dec 10, 2006

### fmucker

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.
$$g=\frac{GM}{r^2}$$
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:
$$F_f = \mu N$$
where-
$$\mu$$ is the coefficient of friction.
$$N$$ is the normal force to the contact surface.
$$F_{f}$$ 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
5. Dec 10, 2006

### Hootenanny

Staff Emeritus
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.

6. Dec 10, 2006

### chaoseverlasting

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.

7. Dec 10, 2006

### chaoseverlasting

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.

8. Dec 10, 2006

### Hootenanny

Staff Emeritus

9. Dec 10, 2006

### chaoseverlasting

For when the asteroid is outside the atmosphere, the equations for the trajectory in 2D are:

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

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
10. Dec 10, 2006

### chaoseverlasting

Shouldnt it?

11. Dec 10, 2006

### Hootenanny

Staff Emeritus
Nope, the acceleration of an object in a gravitational field is independent of the object's mass.

12. Dec 10, 2006

### chaoseverlasting

Im sorry, I didnt know that. What should the acceleration be?

13. Dec 10, 2006

### Hootenanny

Staff Emeritus
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;

$$F = \frac{GMm}{r^2} = ma$$

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

$$a = \frac{GM}{r^2}$$

Just as fmucker posted

14. Dec 10, 2006

### chaoseverlasting

:D Im sorry... I completely overlooked that...

15. Dec 10, 2006

### Hootenanny

Staff Emeritus
No problem, don't let it discourage you from helping though since "While we teach, we learn"

16. Dec 10, 2006

### chaoseverlasting

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...

17. Dec 10, 2006

### fmucker

I think I am starting to understand how to factor in gravity. I use the function:
$$g=\frac{GM}{r^2}$$ and then use $$F_{g} =sin(\theta)$$ for x coordinate and $$-F_{g} =cos(\theta)$$ 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.

18. Dec 10, 2006

### fmucker

Err, maybe $$F_{a} =F_{g} sin(\theta)$$ and $$F_{a}=-F_{g} cos(\theta)$$ ?

19. Dec 10, 2006

### chaoseverlasting

No, as I gather, here $$a_x=\frac{GM}{r^2}sin(\theta)$$ and
$$a_y=-\frac{GM}{r^2}cos(\theta)$$. If youre programming in C++, maybe I can help you...

20. Dec 10, 2006

### OlderDan

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.