Comparison with analytic solution The analytic solution for free-fall with v²-dependent air drag is: 2m DpA Yanalyt (t) = yo + In cosh ( Vanalyt (t) = In [ ]: # Analytic solution 2mg DpA tanh Dp Ag 2m DpAg 2m t Exercise 2: Write code for the analytic 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. 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()

icon
Related questions
Question
Comparison with analytic solution
The analytic solution for free-fall with ²-dependent air drag is:
Yanalyt (t) = yo +
Vanalyt (t)
2m
DpA
In [] # Analytic solution
In cosh
2mg
DpA
(√² ;)]
Dp Ag
2m
t
Dp Ag
2m
tanh
Exercise 2: Write code for the analytic 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.
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()
Transcribed Image Text:Comparison with analytic solution The analytic solution for free-fall with ²-dependent air drag is: Yanalyt (t) = yo + Vanalyt (t) 2m DpA In [] # Analytic solution In cosh 2mg DpA (√² ;)] Dp Ag 2m t Dp Ag 2m tanh Exercise 2: Write code for the analytic 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. 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()
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 2 images

Blurred answer