In: Physics
As you know, the motion of an object is described by the kinematic equations that you learned in your first semester of introductory physics.
For two dimensional projectile motion, where the trajectory of an object is described by an upside down parabola, with constant acceleration ~a = ~g, these equations are: x = x0 + vx0t vx = vx0 y = y0 + vy0t − 1 2 gt2 vy = vy0 − gt v 2 y = v 2 y0 − 2g (y − y0) where vx0 = v0 cos θ vy0 = v0 sin θ
Write a program to analyze the motion of a projectile fired from the top of a tall building.
The program should satisfy the following constraints:
• The input parameters should be read in from the accompanying file “ProjectileParams.txt”.
• The acceleration due to gravity should be a constant.
• It should use appropriate “pass by value” functions to compute the vertical speed as well as the x and y positions.
• It should use a “for” loop. • It should create two output files (Note that all output quantities should have two decimal places of precision):
1. A file named “ProjectileData.txt”, which is a table with columns for time, y-position, x-position, vertical speed, and horizontal speed.
2. A file named “ProjectileResults.txt” which reports the following information based on your results:
– The maximum height reached by the projectile.
– The time for the projectile to reach maximum height.
– The horizontal distance the projectile is from the building when it reaches maximum height
The time for the projectile to reach the ground
. – The horizontal distance from the building where the projectile hits the ground.
– The speed of the projectile as it strikes the ground.
– The angle (relative to the horizontal) that the projectile strikes the ground. Use your algorithm to produce output from the given input file “ProjectileParams.txt”.
Using your output data table, produce plots of velocity versus time and position versus time (for both x and y directions) in Microsoft Excel (or something similar) and include them in your homework write-up. Based on the equations which govern projectile motion, are these plots what you expect? Explain.
Hi,
Hope you are doing well.
A Projectile or a projectile motion is an object thrown with some initial velocity and allowed them to travel under the force of gravity, following a particular trajectory, without being propelled by an engine. The object under projectile motion will experience a constant speed in horizontal direction and a constant acceleration of 9.8 m/s2 in the vertical direction.
Horizontal motion of projectile
The speed in the horizontal direction is 'vx' and this speed doesn't change. The equation which predicts the position at any time in the horizontal direction is simply,
Vertical motion of projectile
Because gravity has a downward pull, the vertical velocity changes constantly. The equation that predicts the vertical velocity at any time 'vy' is
The 'Voy' is simply the original velocity in the
vertical or y-direction.
To calculate the position in the y-direction, the full distance
formula must be used. 'Yo', represents the original
position in the y-direction.
Acceleration for projectiles near the Earth's surface is -9.8
m/s2. We don't re-write the equation with a negative
sign. Rather, we use the negative acceleration value when solving
problems.
When a projectile is launched horizontally a ball rolls off a
table, a car runs off the edge of a cliff, etc. Here the original
y-velocity is zero. For example, if the projectile drops 10 meters,
you can set the Yo = 0 and Yf= -10 m. Or, you can set Yo
= 10 m and Yf = 0. Either works out the same.
Velocity
To determine the total velocity of a projectile, we combine the
horizontal velocity
('vx') and the vertical velocity ('vy') using
the Pythagorean Theorem,
At maximum height
At the top of its path, the projectile no longer is going up and hasn't started down, yet. Its vertical velocity is zero ( vy = 0 ). The only velocity it has is just its horizontal velocity, vx. Remember, the horizontal speed stays constant throughout the projectile path.
A common misconception occurs at the top of a projectile's arc. When asked what the acceleration of the projectile is at this point, many people answer "zero". If it were zero, the projectile would simply keep going in a straight line. However, gravity is still acting, pulling it down, and accelerating it towards the earth. Thus the acceleration at the top is still -9.8 m/s2, just as it's been all along.
Range of projectile motion
For a projectile that is launched at an angle and returns to the same height, we can determine the range or distance it goes horizontally using a fairly simple equation. However, we will focus on the results of studying that equation rather than solving it here.
The ideal combination of time in the air and horizontal speed occurs at 45o. Thus the maximum range or distance occurs when the projectile is launched at this angle. This applies to long jumpers and soccer balls that are two good examples. However, if the projectile starts at a point higher than where it lands, the ideal distance doesn't occur at a 45o angle. Ask your instructor for an explanation. If you calculate the range for a projectile launched at 30o, you will find it's the same as a projectile launched at 60o. The same goes for 40o and 50o. The graph of range vs angle is symmetrical around the 45o maximum.
The equations used to find out various parameters are shown below;
Time of flight,
Maximum height,
Horizontal range,
If the body is projecting from a height “h” above the ground level, the additional height ‘h’ is to be considered and the equations modified accordingly.
The angle (relative to the horizontal) that the projectile strikes the ground,
Hope this helped for your studies. Keep learning. Have a good day.
Feel free to clear any doubts at the comment section.
Please don't forget
to give a thumbs up.
Thank you. :)