{
"cells": [
{
"cell_type": "markdown",
"source": [
"# Computational Dynamics Lab\n",
"\n",
"name: __\n",
"\n",
"Answer the questions below by performing the necessary computation. Much of the\n",
"code can be copied from the [Intro to Computational Dynamics](intro-dynamics.html)\n",
"notebook.\n",
"\n",
"After completion, turn in this `ipynb` file on Blackboard and the paper lab\n",
"report in class.\n"
],
"metadata": {}
},
{
"cell_type": "code",
"source": [
"from numpy import *\n",
"import matplotlib.pyplot as plt"
],
"metadata": {},
"execution_count": null,
"outputs": []
},
{
"cell_type": "markdown",
"source": [
"## A. Projectile Motion\n",
"\n",
"Use the code from the [Intro to Computational Dynamics](intro-dynamics.html)\n",
"notebook to perform the following trials and answer the corresponding questions\n",
"in the lab report.\n",
"\n",
"\n",
"1. Test the flight with a different mass $m$. Does this affect the trajectory?\n",
"2. The example code uses $\\Delta t=0.01$ s. \n",
" Smaller values of $\\Delta t$ will also give accurate results.\n",
" Try to run the projectile motion with $\\Delta t=0.4$ s. \n",
" Is the range and maximum height correct with $\\Delta t = 0.4$ s? \n",
" Find the $\\Delta t$ value at which the range is inaccurate by about 10%.\n",
"3. Find the projectile range for several initial angles. \n",
" Print the range at the end of each loop. \n",
" Record the angle that provides the maximum range.\n",
" (Optional bonus step: make a plot of range versus launch angle.)\n",
"\n",
"> *Hint:* Copy the whole code block from the section called \"A Loop in a Loop\" \n",
"> into this notebook. Then edit it to answer the questions above.\n"
],
"metadata": {}
},
{
"cell_type": "code",
"source": [
"# your code here"
],
"metadata": {},
"execution_count": null,
"outputs": []
},
{
"cell_type": "markdown",
"source": [
"## B. Projectile with Air Drag\n",
"\n",
"Write a new force function for a spherical projectile that experiences air drag\n",
"throughout its flight. Refer to the text [section 6.4][air_drag_in_book] if\n",
"necessary. Use the density of air, $\\rho = 1.2 \\; \\rm{kg}/\\rm{m}^3$, drag\n",
"coefficient $C = 0.5$, and initial velocity 10 m/s at $60^\\circ$.\n",
"\n",
"> *Hint:* Your function should get the input parameters that it needs for the \n",
"> calculation. Something like \\\n",
"> `def drag_force(C,A,v):` \\\n",
"> ` ... `\n",
"\n",
"1. Projectile motion in a vacuum is independent of mass, as you found above.\n",
" What about projectiles with air drag? \n",
" Consider an iron cannonball and a styrofoam ball of the same size (radius 3.8 cm).\n",
" Find the range of the iron cannonball (mass 1.8 kg) \n",
" and the range of a styrofoam ball (mass 12 g).\n",
"2. Suppose you go skydiving. \n",
" What is your terminal velocity if you're tucked into a spherical shape\n",
" ($C \\approx 0.5$)? \n",
" What is your terminal velocity if you're spread-eagle ($C \\approx 1.3$)? \n",
" (Make reasonable estimates of your own body's mass and size.) \n",
" You must show how to use the same code to find the terminal velocity\n",
" -- your answer should agree with (but not use) \n",
" the equation in [section 6.4][air_drag_in_book].\n",
" *Hint:* start with an initial position of `(10e3,0)` and a very small \n",
" initial velocity. Then check the final $y$-velocity value `vv[-1,1]`.\n",
"\n",
"[air_drag_in_book]: https://openstax.org/books/university-physics-volume-1/pages/6-4-drag-force-and-terminal-speed\n"
],
"metadata": {}
},
{
"cell_type": "code",
"source": [
"# your code here"
],
"metadata": {},
"execution_count": null,
"outputs": []
}
],
"metadata": {},
"nbformat": 4,
"nbformat_minor": 5
}