where V
y
represents the vertical velocity of the particle and g is the acceleration due to gravity. The
derivative on the left is the acceleration whereas on the right-hand side of the equation both the
weight and the air-resistance forces are divided by the mass m.
(b) write a simple code that obtains how the vertical velocity V
y
of a spherical
object varies with
time t as it is released from rest.
The key to write codes of this type is to divide your time into small intervals
∆
t and assume that in
the limit when
∆
t approaches zero all the relevant quantities are constant. In other words, you
replace the differential equation above with
and assume that all quantities on the right-hand side of the equation are constant within the time
interval
∆
t. It is as if the interval
∆
t is so small that there is not much time for the quantities on the
right to vary. This will give you the change in velocity
∆
V
y
, which you will then use to update the
velocity V
y
.
This has to be done repeatedly, always increasing the time t in steps of
∆
t and the
velocity in steps of
∆
V
y
. The figure below shows the graphical representation of an algorithm that
might help you with the writing of your code.
The code should
ask for the values of
m, g, b and
∆
t
. Once these values are defined, the code
should provide a series of values of V
y
for each time t.
- Read g, b,m,
∆
t, t
max
…
- Initialize t=0,V
y
=0
- Repeat until
t reaches maximum value t
max
-
-
-
- print t and V
y
-
End repeat-until
-
Plot V
y
vs t
(c)
You should then plot graphs showing V
y
as a function of time t. Repeat this procedure for grains
of different masses. What happens when the mass gets very large
?
Furthermore, convince
yourself that results for larger masses are similar to the cases of smaller resistances. In other
words, increases in m are similar to reductions in the coefficient b.
It turns out that there is an analytical solution to this problem and it is given by
(d) C
ompare the results obtained with your code with those obtained by the analytical expression
above
.
Plot a graph of the error and how it evolves with time. What can you do to improve the
accuracy of your computer-generated results
?
Now that you have investigated how the velocity increases with time, you should then describe
how the position of your projectile varies with the same quantity.
Knowing that V
y
=dY/dt, simply
manipulate the V
y
x t result obtained earlier to find how the position Y varies with time. Imagine that
the grain is released from a height H=5m and calculate the time it takes the grain to reach the
ground. Show that this time depends on the mass of the grain.
e)
Plot a graph of the time to reach the ground as a function of the mass of the object. What can
you say about the often-quoted statement that all objects fall together with the same acceleration
regardless of their masses? When is this a good approximation
?
Do'stlaringiz bilan baham: