%Aaron Titus
%M&I Solutions Manual
\documentclass[10pt]{article}
%import packages
\usepackage{graphicx}
\usepackage{mysty}
\usepackage{hyperref}
\usepackage{SIUnits}
\usepackage{moreverb}
\usepackage{titus}
\topmargin = 0in
\headheight = 0in
\headsep = 0in
\textwidth = 6.5in
\oddsidemargin = 0in
\evensidemargin = 0in
\footskip = 0.5in
\textheight = 9in
\pagestyle{plain}
\renewcommand{\labelenumi}{(\alph{enumi})}
%document
\begin{document}
\noindent
A spring-loaded dart gun is used to shoot a 5-gram dart straight upward. Its spring has a stiffness 50 N/m, and its relaxed length is 5.0 cm. The spring is compressed 4.0 cm from its relaxed length. What is the velocity of the dart when it leaves the spring (i.e. at the instant the spring returns to its relaxed length)? Apply the Momentum Principle iteratively in order to answer the question.
\section*{Solution}
\noindent
Use an iterative approach to answering the question. In other words, write a program that calculates the net force on the dart, its momentum, and its position in small time steps (i.e. small time intervals). The easiest way to do this is to write a program, perhaps in Python.
\noindent
In an iterative loop, the program should do the following \emph{for each object} in the simulation:\\
(1) Calculate the (vector) forces acting on the object and sum the forces to calculate the \emph{net} force on the object.\\
(2) Update the momentum of the object: $\vec{p}_f = \vec{p}_i + \vec{F}_{net}\Delta t$.\\
(3) Update the position of the object $\vec{r}_f = \vec{r}_i + \vec{v}_{avg}\Delta t$, where the average velocity can be approximated as $\vec{v}_{avg}=\frac{\vec{p}_f}{\Delta t}$. (Note: there are more accurate ways to approximate the average velocity.)\\
(4) Update the clock reading, $t = t + \Delta t$.
\\
\noindent
The loop repeats, performing each of the calculations above for each time step, $\Delta t$.\\
\noindent
You can use a condition in the \texttt{while} loop or an \texttt{if} statement to stop the loop and print the position and momentum of the dart. Or, you can simply print the position and momentum of the dart in an infinite loop and after enough iterations, manually stop the simulation and examine the data in order to answer the questions.\\
\noindent
Begin by drawing a picture of the situation, with a coordinate system. This is important for determining the initial position of the dart, for example.
\begin{figure}[h!]
\begin{center}
\includegraphics[scale=0.6]{1320001-solution-1.jpg}
\caption{A dart as it is launched from a dart gun.}
\label{default}
\end{center}
\end{figure}
\noindent
While we can certainly develop realistic graphics in the simulation, let's begin with a simple simulation that does the correct calculations, but without fancy graphics. Thus, the simulation will model the dart as if it's a sphere and will only show the dart and the base of the barrel of the dart gun. In addition, we'll define y = 0 to be the center of the ball when it leaves the dart gun.
\begin{figure}[h!]
\begin{center}
\includegraphics[scale=0.6]{1320001-solution-2.jpg}
\caption{A simple model for the dart gun.}
\label{default}
\end{center}
\end{figure}
\noindent
The initial position and initial velocity of the dart is:
\begin{eqnarray*}
\vec{r}_i & = & <0,-0.04,0>\ \meter \\
\vec{v}_i & = & <0,0,0>\ \meter \\
\end{eqnarray*}
\noindent
The initial amount that the spring is stretched is:
\begin{eqnarray*}
|s| & = & 0.04\ \meter \\
\end{eqnarray*}
\noindent
Because of our choice of coordinate system, it is convenient that the distance stretched is equal to the negative of the dart's y position.
\begin{eqnarray*}
|s| & = & -y_i \\
\end{eqnarray*}
\noindent
This allows us to write the force by the spring on the dart as
\begin{eqnarray*}
\vec{F}_{by\ spring\ on\ dart} & = & <0,k_s|s|,0> \\
& = & -<0,k_sy_i,0> \\
& = & -k_s<0,y_i,0> \\
& = & -k\vec{r}_i \\
\end{eqnarray*}
\noindent
But this holds true for any position dart/spring system, not just the initial position. Thus, while the dart is in contact with the spring,
\begin{eqnarray*}
\vec{F}_{by\ spring\ on\ dart} & = & -k\vec{r}_{dart} \\
\end{eqnarray*}
\noindent
The above relationship between force by the spring on the dart and the position of the dart is only valid because of our choice of the coordinate system. If we did not choose our coordinate system so conveniently, then you would have to explicitly calculate the distance the spring is compressed at any instant during the motion.\\
\noindent
Now, draw a free-body diagram and write the net force on the dart.
\begin{figure}[h!]
\begin{center}
\includegraphics[scale=0.6]{1320001-solution-3.jpg}
\caption{A free-body diagram for the dart.}
\label{default}
\end{center}
\end{figure}
\noindent
The net force on the dart is
\begin{eqnarray*}
\vec{F}_{net} & = & \vec{F}_{\ by\ spring\ on\ dart} + \vec{F}_{grav\ by\ Earth\ on\ dart} \\
& = & -k\vec{r}_{dart} + m<0,-g,0> \\
\end{eqnarray*}
\noindent
Now that we have the expression for the net force on the dart and now that we have its initial conditions, we can write the simulation. Here is an example program in Python to simulate the motion of the dart. This program does not show the spring.
\begin{verbatimtab}
#Simulation of a dart launched vertically from a dart gun
from visual import *
#set the scene so vpython won't autoscale as we watch the animation
scene.autoscale=0
scene.range=0.1
#create the dart and the base of the dart gun; the dart is shown as a sphere
dart=sphere(radius=0.01, pos=(0,-0.04,0), color=color.yellow)
base=box(pos=(0,-0.06,0), size=(0.015,0.002,0.015), color=color.white)
#define constants
k=50.0 #N/m
g=vector(0,-9.8,0) #m/s^2
m=0.005 #kg
#define initial conditions
dart.pos = vector(0,-0.04,0)
dart.v = vector(0,0,0)
dart.p = m*dart.v
t = 0
dt = 0.0005
#print a header for data
print "time (s)", "\t", "position (m)", "\t", "velocity (m/s)"
#stop the loop when the y-position of the dart reaches zero
while dart.pos.y < 0 :
rate(10)
Fspring = -k*dart.pos
Fgrav = -m*g
Fnet = Fspring + Fgrav
dart.p = dart.p + Fnet*dt
dart.v = dart.p/m
dart.pos = dart.pos + dart.v*dt
t = t + dt
print t, "\t", dart.pos, "\t", dart.v
\end{verbatimtab}
\noindent
The last four data points printed are:
\begin{table}[htdp]
\begin{center}
\begin{tabular}{|c|c|c|}
\hline
time (s) & position (m) & velocity (m/s) \\
\hline
0.014 & $<0, -0.00496943, 0>$ & $<0, 4.03974, 0>$\\
\hline
0.0145 & $<0, -0.00293469, 0>$ & $<0, 4.06948, 0>$\\
\hline
0.015 & $<0, -0.000890157, 0>$ & $<0, 4.08906, 0>$\\
\hline
0.0155 & $<0, 0.00115905, 0>$ & $<0, 4.09841, 0>$\\
\hline
\end{tabular}
\caption{Position of the dart as it is launched, before it leaves the spring.}
\end{center}
\label{default}
\end{table}
\noindent
The dart leaves the spring during the interval between t = 0.0150 s and t = 0.0155 s. Its y-velocity when leaving the spring is about 4.1 m/s, rounded to two significant figures.\\
\noindent
It's important to solve this problem iteratively because the net force on the dart is NOT constant. This is apparent by graphing the y-momentum as a function of time. It is not linear. If the y-component of the net force on the dart were constant, then the y-momentum vs. time graph would be linear.
\begin{figure}[h!]
\begin{center}
\includegraphics[scale=0.6]{1320001-solution-4.jpg}
\caption{A graph of y-momentum vs. time for the dart. Note that it is not linear.}
\label{default}
\end{center}
\end{figure}
\end{document}