The analytical solution for free-fall with v²-dependent air drag is: 2m Yanalyt (t) = yo+ DpA In cash (✓DAg) 2m 2mg Vanalyt (t): = tanh √ DpA (√ DoAg) 2m Exercise 2: Write code for the analytical velocity solution In the code cell below, we already implemented the equation for y_analyt. Add the equation for the velocity, storing the result in v_analyt. The hyperbolic tangent function is available as np. tanh. For the time t, use the vector time that we populated in the loop above. Note: If your code generates any error message (in red), you need to fix this error before continuing. Get help from your instructor or classmates if needed. You will need to use some parentheses ( ) for the trigonometric and square root functions, and to enforce the order of operations. However, use them only where necessary; an excessive number of parentheses makes it harder to debug your code. [ ] # Analytical solution y_analyt = y0 + 2*m/(D✶rho*A) * np.log(np.cosh(np.sqrt(D*rho*A*g/(2*m))*time)) # YOUR CODE HERE raise NotImplementedError() Now let's print some values v_analyt. (When printing large arrays, the print() command is smart enough not to print all elements, but only a few at the beginning and at the end of the array.) Verify that the velocities make sense! (l.e., are the values reasonable and in agreement with your measurements?) [ ]: print('v_analyt = ', v_analyt)

University Physics Volume 1
18th Edition
ISBN:9781938168277
Author:William Moebs, Samuel J. Ling, Jeff Sanny
Publisher:William Moebs, Samuel J. Ling, Jeff Sanny
Chapter2: Vectors
Section: Chapter Questions
Problem 91CP: between points in a plane do not change when a coordinate system is rotated In other words, the...
Question
The analytical solution for free-fall with v²-dependent air drag is:
2m
Yanalyt (t) = yo+
DpA
In cash (✓DAg)
2m
2mg
Vanalyt (t):
=
tanh
√ DpA
(√ DoAg)
2m
Exercise 2: Write code for the analytical velocity solution
In the code cell below, we already implemented the equation for y_analyt. Add the equation for the velocity, storing the result in v_analyt. The hyperbolic tangent
function is available as np. tanh. For the time t, use the vector time that we populated in the loop above.
Note: If your code generates any error message (in red), you need to fix this error before continuing. Get help from your instructor or classmates if needed. You will need
to use some parentheses ( ) for the trigonometric and square root functions, and to enforce the order of operations. However, use them only where necessary; an
excessive number of parentheses makes it harder to debug your code.
[ ] # Analytical solution
y_analyt = y0 + 2*m/(D✶rho*A) * np.log(np.cosh(np.sqrt(D*rho*A*g/(2*m))*time))
# YOUR CODE HERE
raise NotImplementedError()
Now let's print some values v_analyt. (When printing large arrays, the print() command is smart enough not to print all elements, but only a few at the beginning
and at the end of the array.)
Verify that the velocities make sense! (l.e., are the values reasonable and in agreement with your measurements?)
[ ]: print('v_analyt = ', v_analyt)
Transcribed Image Text:The analytical solution for free-fall with v²-dependent air drag is: 2m Yanalyt (t) = yo+ DpA In cash (✓DAg) 2m 2mg Vanalyt (t): = tanh √ DpA (√ DoAg) 2m Exercise 2: Write code for the analytical velocity solution In the code cell below, we already implemented the equation for y_analyt. Add the equation for the velocity, storing the result in v_analyt. The hyperbolic tangent function is available as np. tanh. For the time t, use the vector time that we populated in the loop above. Note: If your code generates any error message (in red), you need to fix this error before continuing. Get help from your instructor or classmates if needed. You will need to use some parentheses ( ) for the trigonometric and square root functions, and to enforce the order of operations. However, use them only where necessary; an excessive number of parentheses makes it harder to debug your code. [ ] # Analytical solution y_analyt = y0 + 2*m/(D✶rho*A) * np.log(np.cosh(np.sqrt(D*rho*A*g/(2*m))*time)) # YOUR CODE HERE raise NotImplementedError() Now let's print some values v_analyt. (When printing large arrays, the print() command is smart enough not to print all elements, but only a few at the beginning and at the end of the array.) Verify that the velocities make sense! (l.e., are the values reasonable and in agreement with your measurements?) [ ]: print('v_analyt = ', v_analyt)
Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
University Physics Volume 1
University Physics Volume 1
Physics
ISBN:
9781938168277
Author:
William Moebs, Samuel J. Ling, Jeff Sanny
Publisher:
OpenStax - Rice University
Physics for Scientists and Engineers: Foundations…
Physics for Scientists and Engineers: Foundations…
Physics
ISBN:
9781133939146
Author:
Katz, Debora M.
Publisher:
Cengage Learning
Glencoe Physics: Principles and Problems, Student…
Glencoe Physics: Principles and Problems, Student…
Physics
ISBN:
9780078807213
Author:
Paul W. Zitzewitz
Publisher:
Glencoe/McGraw-Hill