User Tools

Site Tools


gibson:teaching:spring-2018:math445:lab11

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
gibson:teaching:spring-2018:math445:lab11 [2018/04/26 08:59]
gibson
gibson:teaching:spring-2018:math445:lab11 [2018/05/01 06:23]
gibson
Line 18: Line 18:
 $ dy/dt = v_y $  $ dy/dt = v_y $ 
  
-$ dv_x/dt = -\frac{\mu}{m} v_x \sqrt{v_x^2 + v_y^2}$ ​+$ dv_x/dt = -\frac{\alpha}{m} v_x \sqrt{v_x^2 + v_y^2}$ ​
  
-$ dv_y/dt = -\frac{\mu}{m} v_y \sqrt{v_x^2 + v_y^2} - g$+$ dv_y/dt = -\frac{\alpha}{m} v_y \sqrt{v_x^2 + v_y^2} - g$
  
-The constant $g = 9.81 m/s^2$ is the acceleration due to gravity. The constant $\mu = \rho_{air} C_D A/2$ in the air resistance term depends on physical characteristics of the projectile and the air. The following code will calculate $\mu$ for a standard baseball, given either value of $\rho_{air}$.+The constant $g = 9.81 m/s^2$ is the acceleration due to gravity. The constant $\alpha = \rho_{air} C_D A/2$ in the air resistance term depends on physical characteristics of the projectile and the air. The following code will calculate $\alpha$ for a standard baseball, given either value of $\rho_{air}$.
  
 <​code>​ <​code>​
Line 34: Line 34:
 m = 0.145; ​      % mass of baseball in kg (145 gm m = 0.145; ​      % mass of baseball in kg (145 gm
  
-mu = rho_air*C_D*A/​2;​ % coefficient of nonlinear |v|^2 term, in mks units+alpha = rho_air*C_D*A/​2;​ % coefficient of nonlinear |v|^2 term, in mks units
 </​code>​ </​code>​
  
  
-**Problem 2:** Determine the minimum initial ball speed and optimal angle that result in a home run, at sea level, and in Denver. You'll have to start with a guesses for $v_0$ and $\theta$ and tweak them by stages. For a starting point, recall that a good fastball clocks at 90 mph or roughly 40 m/s, and that 45 degrees ​is $\theta =\pi/4 \approx 0.78$. +**Problem 2:** Determine the minimum initial ball speed and optimal angle that result in a home run, at sea level, and in Denver. You'll have to start with a guesses for $v_0$ and $\theta$ and tweak them by stages. For a starting point, recall that a good fastball clocks at 90 mph or roughly 40 m/s, and that the optimal angle is $\theta = \pi/4 \approx 0.79when there is no air resistance
  
 Note that Matlab'​s ode45 function will return the x,y positions of the trajectory points at discrete time intervals, and it's unlikely that any of these will line up exactly with the outfield fence. However you can use interpolation to get the ball height y at exactly at the fence, as follows. If you set up your Matlab code so that $x$ is //x(:,1)// and $y$ is //x(:,2)//, the following code will determine the height $y$ of the ball at the position of the fence, $x=120$. ​ Note that Matlab'​s ode45 function will return the x,y positions of the trajectory points at discrete time intervals, and it's unlikely that any of these will line up exactly with the outfield fence. However you can use interpolation to get the ball height y at exactly at the fence, as follows. If you set up your Matlab code so that $x$ is //x(:,1)// and $y$ is //x(:,2)//, the following code will determine the height $y$ of the ball at the position of the fence, $x=120$. ​
gibson/teaching/spring-2018/math445/lab11.txt ยท Last modified: 2018/05/01 06:23 by gibson