# Homework Help: 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.

21. Dec 10, 2006

### chaoseverlasting

Then friction would be a variable here, as the velocity of the asteroid will vary with time. How would you take into account the coeff. of friction here? Since there is no contact between surfaces, what would the normal reaction be? Or is there some other method to calculate friction here?

22. Dec 10, 2006

### andrevdh

Well, I got the impression that you should keep the acceleration due to gravity constant in this project especially in view of the fact that the asteroid can go inside the gas gaint. If d is the distance of the asteroid above the atmosphere g would amount to

$$g = \frac{GM}{(R + d)^2}$$

which comes to

$$\frac{GM}{R^2 + 2Rd + d^2}$$

multiply with $$\frac{1}{R^2}$$ top and bottom to get

$$g(d) = \frac{1}{1 + \frac{d^2 + 2Rd}{R^2}}$$

which follows from the statement that gravity is 1.0 at the surface. Since R = 1.0 this simplifies to

$$g(d) = \frac{1}{1 + d^2 + 2d}$$

This models gravity outside the gaint as a function of the distance that the asteroid is above the atmosphere. Problem is what to do when it goes inside keep it at 1.0?

Last edited: Dec 10, 2006
23. Dec 10, 2006

### OlderDan

As others have pointed out, the physics in this problem is a bit cloudy (pun intended ) A very common assumption for objects moving through a gas is that the force of resistance is proportional to the velocity. The units specified in the origianl statement hint that this is the right assumption. If you write

F = -bv

then b is the coefficient of the force and has units [force/speed] or N/(m/sec). The "acceleration per time" given in the problem statement would have units of force/mass/time, and really makes no sense. But if you write

ma = -bv and solve for a then

a = -(b/m)v

The units of b/m would be the units of acceleration/speed, which is pretty close to the problem statement and is independent of the mass of the object. I would go with this expression using b/m = 100

The total acceleration is the vector sum of the attractive gravitational force and this resistive force.

How have you guys defined angle theta?

Last edited: Dec 10, 2006
24. Dec 10, 2006

### chaoseverlasting

If you take the total distance of the asteroid from the center of the gas giant as 'r', then your expression becomes simpler. It also becomes easier to program. Also, if you assume the trajectory of the asteroid to be circular, 'r' remains constant.

Inside the atmosphere however, the easiest way would be to use an if-else construct to check in the begenning of the program if the asteroid is inside or outside of the atmosphere. In that case, you would have to factor in friction somehow, which I dont know how to do.

There is a third possibility however which must also be checked for: the asteroid could be outside the atmosphere intially and due to its velocity, enter the atmosphere, in which case the trajectory wont be circular.... man this is messed up...

25. Dec 10, 2006

### chaoseverlasting

Theta would be the angle the velocity vector makes with the line joining the center of the gas giant and intial position of the asteroid