# Aerodynamic Motion

In class, we analyzed the path (trajectory) of a projectile assuming negligible aerodynamic drag. For this exam, you are to perform a similar analysis, but include a model for aerodynamic drag.

The equations defining the horizontal and vertical position of a projectile are, respectively:

*x*=*v*0*mc*cos*θ*(1−*e*−*cm**t*)

*y*=*mc*(*v*0sin*θ*+*mgc*)(1−*e*−*cm**t*)−*mgc**t*

where *v*0 is the initial velocity of the projectile, *θ* is the initial angle, *c* is the drag coefficient of the projectile,*m* is the mass of the projectile, *t* is time, and *g* is the gravitational acceleration constant.

The projectile is launched at 11.4 m/s at an angle of 22.5°.

The projectile exhibits a drag coefficient *c* of 0.1 N/(m/s) and is 0.2 kg. Assume the gravitational acceleration constant *g* is 9.81 m/s^{2}.

- Write two MATLAB functions. One will take inputs of
*v*0,*θ*,*c*,*m*, and*t*and will output the horizontal displacement of the projectile, using the equation shown above for*x*. The other function will take inputs of*v*0,*θ*,*c*,*m*,*t*, and*g*and will output the vertical displacement of the projectile, using the equation shown above for*y*. Attach the two .m function files for credit. - Make an array/matrix of time values starting at 0 and ending at a point of your choosing. If you plug this time array, along with the other required inputs mentioned above, into your functions, you will have horizontal and vertical coordinates of the projectile.

Using the functions from 1, find the time it takes for the projectile to hit the ground.

Once you have determined this time, plot the trajectory of the projectile from *t*=0 until it hits the ground (horizontal displacement on the horizontal axis and vertical displacement on the vertical axis). Include at least 100 data points on your curve.

Attach a .jpg file of the chart and a text file of your command window dialog containing the command string you used to generate your chart. To generate the .jpg, once the figure has been generated, in the chart window, select “File/Save As…”, then select the drop down arrow in the “Save as type:” and select the “JPEG image (*.jpg)” file type. Then simply name your file. Or you can simply use the Snipping Tool app.

- Use symbolic mathematics and the differentiation function in MATLAB to determine an expression for the vertical component of the velocity of the projectile as a function of
*v*0,*θ*,*c*,*m*,*t*, and*g*. This is the relationship between vertical position*y*and vertical velocity*v**y*:

*v**y*=*dydt*

Attach a text file of your command window dialog containing the command string you used to generate your answer.

**Solution**** **

**assign1_x.m**** **

v0 = 11.4;

theta = 22.5 / 180 *pi;

c = 0.1;

m = 0.2;

t = 0:0.1:10;

x = v0 * m * c * cos(theta) * ( 1 – exp(-c * m * t));

plot(t,x);** **

**assign2_y.m**** **

v0 = 11.4;

theta = 22.5 / 180 *pi;

c = 0.1;

m = 0.2;

t = 0:0.1:10;

g = 9.8;

y = m * c * (v0 * sin(theta) + g)*( 1 – exp(-c * m * t)) – m * g * c * t;

plot(t,x);