Вы находитесь на странице: 1из 8

Projectile Motion Using Runge-Kutta Methods

Kamalu J. Beamer
April 2, 2013
1 Introduction
An objects trajectory through a medium is an important phenomenon that
has many applications in physics. These trajectories are dened by dierential
equations. There are many ways to evolve dynamical systems through the evo-
lution of their dierential equations. Using the 4th order Runge-Kutta method,
a program was developed to calculate the trajectory of a baseballs precession
through the air. The simulations were done with dierent constraint conditions.
Data sets were produced for one drag-free environment, two environments with
dierent altitudes and drag forces, and two environments with dierent alti-
tudes, drag forces and with either head or tail wind. It was determined that a
45
0
home run launch angle was optimal in the vacuum (drag-free) while a 40
0
home run launch angle was optimal in all environments with drag force. It was
also determined that at higher altitudes, drag forces are exponentially reduced.
The applied drag forces are described in the Theory section and the two
environments with dierent altitudes were NY (altitude = 0 m) and Denver
(altitude = 1600 m). After the program was designed to accomodate for drag
forces as functions of altitude, additional head and tail winds were applied.
Simulations were done in both environments, each with a head and then a tail
wind of 15 mph = 6.7056
m
s
.
2 Theory
A baseballs ight through the air is only an interesting case if drag forces
are applicable. A baseballs ight through a vacuum follows simple parabolic
motion, as is seen in Figure 3; the red line represents the no drag case. Figure
1 [4] is a free-body diagram of a baseball in ight; velocity is not a force, the
arrow is to indicate the direction of the velocity. In the drag free case, gravity
is the only force aecting the ball, therefore the velocity is constant throughout
the entire ight of the ball. With only gravitational force, the baseball follows
simple parabolic motion. These phenomena are resultant of Newtons Laws [4],
most importantly the Law 1 an object continues in its initial state of rest or
motion with uniform velocity unless it is acted on by an unbalanced, or net
external force. [4].
1
Figure 1: A baseballs precession through the air with an initial velocity, and
two applied forces.
With the introduction of drag force, the dynamical system acts signicantly
dierent. The eect of air resistance is important for ... a high ying baseball
hit deep to the outeld [2]; the air resistance or drag force is opposite the
projectiles velocity. The Prandtl expression for the motion of a particle in a
medium in which there is a resisting force proportional to the speed or two the
square of the speed [2] is as follows.
F
drag
=
1
2
C
w
Av
2

In the previous equation C


w
is drag coecient, A is the cross-sectional area
of the object, is the air density, v is the velocity of the object. All values
relative to the lab are given in Table 1 [1]. The nal drag force is an additional
force applied to the baseball during its ight. One further modication must
be made to the previous equation before we can apply it to the baseball. We
are also interested in observing a baseballs trajectory at dierent altitudes, yet
there is no height dependence in the previous equation. To remedy, we equate
=
0
exp
h/h0
[1] with h as the altitude and h
0
(scale height) as a constant
found in Table 1.
Baseball Mass 0.145 kg
Baseball Area 0.0043 m
2
Drag Coe (C
w
) 0.35
Air Density (
0
) 1.22
kg
m
3
Typical HR Velocity 49.0
m
s
Scale Height (h
0
) 7000 m
Table 1 - Input values of trajectory-calculating program.
With the revised drag force, all applicable forces were cast on the baseball
in ight. The following equation is the nal form of Newtons force law applied
to the baseball.
F
total
= F
grav
+ F
drag
Since both forces are in the opposite direction of the baseballs initial velocity,
they are both considered negative. With this characterization, we obtain the
following.
2
m
dv
dt
= -mg -
1
2
C
w
Av
2

0
exp
h/h0
,
dx
dt
= v
Evidently, these are the equations of motion converted to the form utiliz-
able by RK4 [1]. The 4th order Runge-Kutta method is a more stable ver-
sion of the 2nd order Runge-Kutta method which was not applied in this
lab. General Runge-Kutta methods are a form of numerical analysis that
utilize an iterative method for dierential equation solution approximation.
Proper Runge-Kutta implementation and function denition can save signi-
cant amounts of code, and was therefore imbedded into the developed program.
Other (non-RK4) functions were also dened and can be seen on my course
webpage (www2.hawaii.edu/kjbeamer/) under Lab 9 code.
The RK4 function was used in an iterative process in the code wherein new
values were calculated. At each consecutive step, the old value was set equal
to the newly calculated value so that the systems dynamically evolved, step by
step. The following is the 4th order Runge-Kutta (RK4) formulation.
k
1
= dtf(t,y)
k
2
= dtf(t+
dt
2
,y(t)+k
1
/2)
k
3
= dtf(t+
dt
2
,y(t)+k
2
/2)
k
4
= dtf(t+dt,y(t)+k
3
)
y(t+dt) = y(t) +
1
6
(k
1
+ 2k
2
+ 2k
3
+ k
4
)
With this RK4 formulation in the form of a function, the correct gravita-
tional force and drag force were inserted into the functions. The program was
used to calculate the trajectory of a baseball in many dierent atmospheric sit-
uations. The only problem is that no error was calculated by the program as
I am unsure how to incorporate error into a seemingly perfectly deterministic
iterative process.
3 Data/Calculations
The projectile code was converted into an executionable and the range of a hit
vs. initial angle was calculated (data in Table 2) and graphed in Figure 2. As
the drag force is a function of and is further a function of exponential reliance
on height, we expect the zero drag case to produce the largest horzitontal range,
the Denver case to produce the second largest horizontal range (because Denver
sits at a higher altitude), and the NY case to produce the smallest horizontal
range. The data found in Table 2 conrms these predictions.
3

0
(deg) No Drag Dist(m) Drag in NY Dist(m) Drag in Denver Dist(m)
30 211.752 116.292 125.230
35 229.993 120.601 130.376
40 240.982 121.765 132.228
45 244.617 120.279 130.950
50 240.949 116.111 126.550
55 229.901 109.371 119.426
60 211.925 100.067 109.431
Table 2 - Simulated values of distance travelled as a function of initial launch
angle for the no drag case and the two drag cases at dierent altitudes.
Evident in Table 2 are the maximum home run distances of dierent at-
mospheric conditions; one with no atmosphere, one with NYs atmosphere and
one with Denvers atmosphere. Because air density is exponentially related to
altitude, the maximum home run distances will also vary as a function of alti-
tude. This explains why the maximum distance without drag is 2 times larger
than the maximum distance with drag in NY and 1.8 times larger than the
maximum distance with drag in Denver.
The following graph represents the total horizontal range spanned by base-
balls launched at dierent initial angles. As theoretically expected, the red line
(no drag case) follows a perfect parabolic trajectory. Also as expected, a home
run hit in Yankee Stadium experiences more drag force and therefore covers less
horizontal range than a home run hit at Coors Field.
It is interesting to note that even though the two environments in which
the simulations take place dier by 1600 m, the range of values of horizontal
distance covered by the baseballs are always within 11 meters of each other.
4
Figure 2: Trajectories of baseballs launched with the same total speed, but at
dierent initial angles. The red, green and blue lines represent trajectories of
increasing drag force.
From Figure 2, it is evident that drag signicantly aects the range. In the
no drag case, optimal horizontal distance is associated with an initial launch
angle of 45
0
, as is theoretically expected. Interestingly, when drag forces are
introduced (in NY and Denver), optimal horizontal distance is associated with
an initial launch angle of 40
0
. This has to do with the time that the baseballs
are in the air; the longer the duration, the longer the drag force is applied. This
explains why an angle slightly smaller than the theoretical expectation produces
a traversed distance. A baseball launched at a smaller angle will be in the air
for a shorter period, and will be subject to the drag force for a shorter period.
The following gure properly displays the aect that drag forces have on
trajectory. The seven trajectories with the largest x ranges are the baseballs hit
in the ideal, drag free case. The seven trajectories with the smallest x ranges
are of baseballs hit with the same initial conditions as the other seven, except
the addition of a drag force at sea level.
5
Figure 3: The trajectories of baseballs hit in NY, all with the same initial
velocity. The addition of a drag force can half the horizontal range of the
baseballs path.
Once the projectile programs was able to calculate trajectories while includ-
ing height dependent drag forces, it was further modied to take head and tail
winds into account. Table 3 contains the data of the simulations at both alti-
tudes, both with a 15 mph tail wind (wind in the same direction as the ball)
and a 15 mph head wind (wind in the opposite direction as the ball). This was
a simple adjustment to the code; being that 15 mph is equivalent to 6.7056
m
s
,
this value was simply added to the initial velocity in the tail wind case, and sub-
tracted from the initial velocity in the head wind case. Simple vector addition
allows us to make this subtle mathematical change.

0
(deg) Denver-tail(m) NY-tail(m) Denver-head(m) NY-head(m)
30 146.498 134.595 103.412 96.9197
35 151.617 138.853 108.119 101.049
40 152.948 139.694 110.273 102.520
45 151.034 137.493 109.479 101.623
50 145.701 132.391 106.186 98.4401
55 137.116 124.395 100.346 92.8267
60 125.519 113.812 92.0708 85.1147
Table 3 - Simulated values of distanced traveled for dierent launch angles.
Data was taken at two altitudes with either a 15 mph tail or head wind.
6
The data in Table 3 is what was theoretically expected and is plotted in
the following gure. The dierence between the red and green trajectories is
the altitude dierence between NY and Denver. Being that Denver has a lower
atmospheric density, baseballs hit in Denver travel greater distances than those
in NY. The dierence between the red and blue trajectories is the direction of
the wind. Being that a tail wind will add to the horizontal component of the
baseballs velocity, baseballs in this scenario will travel further distances, as is
evident in Figure 4.
Figure 4: A plot of the data in Table 3. For each respective tail or head wind
case, the baseball launched at the higher altitude location covered a greater
range.
4 Conclusion
The 4th order Runge-Kutta method again proves to be a valuable numerical
analysis technique to be utilized in code. The RK4s versatility through the
insertion of force laws makes it widely applicable to many dynamical systems
that are described by coupled dierential equations. The projectile program
calculated drag trajectories that had smaller ranges than their no drag counter
parts. As the drag force depends on air density, experimental concepts agree
with theoretical concepts. It was also determined that a 45
0
home run launch
angle was optimal in vacuum, while a 40
0
home run launch angle was optimal in
all environments with drag. As theoretically expected, it was also determined
that at higher altitudes, drag forces are exponentially reduced.
7
5 References
1. Gorham, Peter. Physics305: Computational Physics. Index. N.p., n.d.
Web. 02 Apr. 2013. <http://www.phys.hawaii.edu/gorham/p305/P305index.html>.
2. Marion, Jerry B., and Stephen T. Thornton. Classical Dynamics of Parti-
cles and Systems. New York: Harcourt Brace and Company, 1988. Print.
3. Rainville, Earl D., and Phillip Edward Bedient. Elementary Dierential
Equations. New York: Macmillan, 1969. Print.
4. The Path and Range of a Baseball. ThinkQuest. Oracle Foundation,
n.d. Web. 02 Apr. 2013. <http://library.thinkquest.org/11902/physics/range.html>.
8

Вам также может понравиться