Asteroid Trajectory Equations?

In summary, the conversation discusses the parameters and requirements for a programming project that simulates the trajectory of an asteroid passing by a gas giant. The main concerns are applying the coefficient of friction and gravity to a 3D velocity vector, as well as understanding the equations and concepts involved in the simulation. Some confusion arises regarding the acceleration due to gravity for an object with negligible mass, but it is clarified that the acceleration is independent of the mass.
  • #1
fmucker
7
0

Homework Statement


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:

Create a program that simulates the trajectory of an asteroid passing by a gas giant.

Below are parameters needed for the simulation. The units for time and distance have been chosen to simplify some of the parameters. Assume the asteroid mass is negligible.

Gravity = 1.0 (gravitational acceleration when at distance 1.0)
Atmospheric radius = 1.0 (distance from planet centroid to end of atmosphere)
Coefficient of friction = 100.0 (acceleration per time per speed while within atmosphere)

Distance (initial) from planet centroid in range [1.0, 10.0] input by user
Speed (initial) of asteroid in range [0.0, 10.0] input by user
Angle of approach in radians in range [0.0, 1.0] input by user (0 means aimed at planet)

Simulate the trajectory of the asteroid, starting at time 0.0, and with the position and velocity as specified by user input. Note that the user does not need to specify the asteroid initial position using 3 coordinates. The user is only asked for the relevant information. For your Cartesian coordinates, let the centroid of the gas giant be fixed at coordinate (0.0, 0.0, 0.0) and let the initial location of the asteroid be (Distance (initial), 0.0, 0.0). Set the third coordinate of the initial velocity vector to 0.0, and set its other coordinates to be non-negative.

Use the simplest model of friction. The asteroid is either within the atmosphere or outside it. If the asteroid is within the atmosphere, then it is subject to a constant coefficient of friction, regardless of its precise location.

(cut the rest off for space)
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.
 
Physics news on Phys.org
  • #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.
 
  • #3
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
I have done a little research on the matter and I remember a bit from my high school Physics class. He is wanting us to use the inverse square law for gravity.
[tex]g=\frac{GM}{r^2}[/tex]
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]
where-
[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:
  • #5
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
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
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
chaoseverlasting said:
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.
Are you sure about that?
 
  • #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]
[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:
  • #10
Shouldnt it?
 
  • #11
chaoseverlasting said:
Shouldnt it?
Nope, the acceleration of an object in a gravitational field is independent of the object's mass.
 
  • #12
Im sorry, I didnt know that. What should the acceleration be?
 
  • #13
chaoseverlasting said:
Im sorry, I didnt know that. What should the acceleration be?
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:
 
  • #14
:D I am sorry... I completely overlooked that...
 
  • #15
chaoseverlasting said:
:D I am sorry... I completely overlooked that...
No problem, don't let it discourage you from helping though since "While we teach, we learn" :wink:
 
  • #16
Now, as frictional force opposes the tendency of motion, I think it should act in the opposite direction of the gravitational force... I don't know how you'll factor in the coeff. of friction though...
 
  • #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.
 
  • #18
Err, maybe [tex]F_{a} =F_{g} sin(\theta)[/tex] and [tex]F_{a}=-F_{g} cos(\theta)[/tex] ?
 
  • #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...
 
  • #20
chaoseverlasting said:
Now, as frictional force opposes the tendency of motion, I think it should act in the opposite direction of the gravitational force... I don't know how you'll factor in the coeff. of friction though...

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

[tex]g = \frac{GM}{(R + d)^2}[/tex]

which comes to

[tex]\frac{GM}{R^2 + 2Rd + d^2}[/tex]

multiply with [tex]\frac{1}{R^2}[/tex] top and bottom to get

[tex]g(d) = \frac{1}{1 + \frac{d^2 + 2Rd}{R^2}}[/tex]

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

[tex]g(d) = \frac{1}{1 + d^2 + 2d}[/tex]

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:
  • #23
chaoseverlasting said:
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?

As others have pointed out, the physics in this problem is a bit cloudy (pun intended :smile: ) 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:
  • #24
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 don't 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 won't be circular... man this is messed up...
 
  • #25
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
 
  • #26
Theta is the initial angle entered by the user and then updated as gravity is applied to the asteroid. It is a trajectory program that could be circular, but normally will not. The asteriod needs the ability to orbit, crash, or just do a flyby. Because initial distance, speed, and angle can very, I need a general formula that will be constant with changing variables. As I said earlier, the programming will be no problem, it is the equations that are the problem.

As for the asteroid on the inside of the planet, wouldn't gravity simply increase exponentially (say it's .5 units in [tex](-.5^{-1})^2=4[/tex] right)? The force of gravity comes from the center of the planet in this problem.
 
  • #27
fmucker said:
As for the asteroid on the inside of the planet, wouldn't gravity simply increase exponentially (say it's .5 units in [tex](-.5^{-1})^2=4[/tex] right)? The force of gravity comes from the center of the planet in this problem.

It is well known that the force of gravity from a spherically symmetric distribution of mass depends only on the mass that is inside the surface of the concentric sphere that contains the object. (For example, the force of gravity between the Earth and an object at the center of the Earth would be zero.) In this problem it would be very reasonable to assume that the gravitational acceleration decreases as you approach the center of the gas giant. Since the problem states that there is an atmospheric radius, it would be reasonable to assume that the gas has uniform density within that radius. That density would be the total mass of the gas divided by the volume of the gas. Since you know the acceleration at the gas surface, you could find the (lower) gravitaional acceleration below the surface by seeing how the "interior" gas mass depends on r.

EDIT: The assumption of uniform density is also consistent with the assumption of a constant coefficient of friction for the retarding force.
 
Last edited:
  • #28
The gravity will decrease inside because less mass is attracting the asteroid. What it boils down to is that you can ignore the shell of mass on the outside of the point where the asteroid is and just calculate the attraction due to the mass of the gaint "below" the asteroid.

My original question was: Is there any indication that you are suppose to let the acceleration due to gravity of the asteroid change as its distance from the gg (gas gaint) decreases? I got the impression that you need not change it for this project.
 
  • #29
fmucker said:
Theta is the initial angle entered by the user and then updated as gravity is applied to the asteroid. It is a trajectory program that could be circular, but normally will not. The asteriod needs the ability to orbit, crash, or just do a flyby. Because initial distance, speed, and angle can very, I need a general formula that will be constant with changing variables. As I said earlier, the programming will be no problem, it is the equations that are the problem.
QUOTE]

With this definition, theta is the angle between the acceleration due to gravity and the velocity, and the resistive force accleration is opposite velocity. In an approach phase (r getting smaller) the angle between the two accelerations is greater than 90º. In a receding phase, it is less than 90º. You will probably want the components of acceleration in the radial direction and perpendicular to the radial direction. Maybe you already have that.
 
Last edited:
  • #30
The way to approach the problem is to divide the velocity vector into two components. One radial and one tangential. The radial component always points to the gg (at the origin of the coordinate system). The gravitational acceleration will increase only the radial velocity component according to

[tex]v_{n+1} = v_n + g \Delta t [/tex]

for a time interval of one and gravitational accelration of one this would come to

[tex]v_{n+1} = v_n + 1[/tex]

once you have the new velocity you calculate the new position coordinates of the asteroid

[tex]u_{n+1} = u_n + v[/tex]

for a time interval of one. Here a sign convention would help. The asteroid is approaching the gg so the radial velocity component will be negative.
 
  • #31
fmucker said:
I am pretty sure I have everything figured out except the coef of friction. I have no idea what equation to use for it or how to apply it.

I gave you what I think you need for that. Take the acceleration from friction to be in the opposite direction of the velocity with magnitude proportional to the velocity. As I look at the initial conditions again, I can't see 100 being a reasonable number for the proportionality constant, but you can easily adjust that value in your program. Resolve both accelerations (gravity and friction) into vertical and tangential components.

I suggest you add the two accelerations to your diagram.
 
  • #32
The effect of friction on the asteroid is to reduce the magnitude (size) of the velocity of the asteroid. It does not change the direction of the velocity of the asteroid. For example if the velocity of the asteroid is 1000 distance units per time unit while it is going in some direction inside of the gg then the friction will reduce it to 900 in a time interval of one unit. This follows from the definition of average acceleration:

[tex]a = \frac{\Delta v}{\Delta t}[/tex]

if we take the acceleration due to friction f (it will be a -100 due to the fact that it is decelerating the asteroid) and investigate the change in speed during a time interval of one unit this formula comes to

[tex]f = \Delta v = v_{n+1} - v_n[/tex]

so that the new speed of the asteroid will be

[tex]v_{n+1} = v_n + f[/tex]
 
  • #33
My instructor finally repsonded to my message. He makes it sound so much simpler than it is.

These are the equations we need:

position(t+0.001) approximately = position(t) + velocity(t)*0.001

+ is defined here as adding the coordinates (x,y,z) separately.
The y coordinate of the sum is gotten by adding the two y coordinates of the
items being added together.

velocity(t+0.001) approximately = velocity(t) + acceleration(t)*0.001

gravitational acceleration = a / (d*d)
a is given as 1.0
d is the Cartesian distance between the asteroid and the planet
direction of gravitational acceleration is from the asteroid to the planet

frictional acceleration = speed * coefficient
speed comes from the velocity vector, sqrt(vel.x^2+vel.y^2+vel.z^2)
coefficient is given as 100.0
frictional acceleration is 0 if asteroid is not inside planet atmosphere
direction of frictional acceleration is opposite of the direction the asteroid
is moving (opposite to velocity vector)

Thanks for everyone's help, but I guess my teacher wants it to be super simple and I have it figured out now.
 

1. What is an asteroid trajectory equation?

An asteroid trajectory equation is a mathematical formula that describes the path an asteroid takes as it moves through space. It takes into account factors such as the asteroid's initial position, velocity, and the gravitational forces acting upon it.

2. How are asteroid trajectory equations calculated?

Asteroid trajectory equations are typically calculated using Newton's laws of motion and the law of universal gravitation. These equations can be solved using numerical methods or by hand using calculus.

3. What factors affect an asteroid's trajectory?

Several factors can affect an asteroid's trajectory, including its initial velocity, the gravitational forces exerted by other objects in space, and any collisions or interactions with other asteroids or celestial bodies.

4. Can asteroid trajectory equations predict the exact path of an asteroid?

No, asteroid trajectory equations can only provide an estimation of an asteroid's path. Factors such as the unpredictable gravitational forces of other objects and potential collisions make it impossible to predict the exact trajectory of an asteroid.

5. Why are asteroid trajectory equations important?

Asteroid trajectory equations are important for understanding and predicting the movements of asteroids, which can help in identifying potential threats to Earth and in planning future space missions. They also provide valuable insights into the dynamics of our solar system.

Similar threads

  • Introductory Physics Homework Help
Replies
11
Views
763
  • Differential Geometry
Replies
0
Views
626
  • Programming and Computer Science
Replies
4
Views
611
  • Sci-Fi Writing and World Building
Replies
21
Views
1K
  • Introductory Physics Homework Help
Replies
7
Views
2K
  • Introductory Physics Homework Help
Replies
4
Views
1K
  • Astronomy and Astrophysics
Replies
1
Views
2K
  • Programming and Computer Science
Replies
1
Views
2K
  • Introductory Physics Homework Help
Replies
2
Views
11K
Replies
1
Views
962
Back
Top