Description
For this project, students were asked to write a MATLAB script employing ODE45 that
uses a given set of formulas to predict the trajectory of a bottle rocket. This script was required
to output both a plot of the rocket’s trajectory as well as a plot of the rocket’s thrust profile.
Students were then asked to verify their code using a given verification case, as well as study
the effects of 4 different parameters: the initial pressure of air, the initial volume fraction of
water, the drag coefficient, and the launch parameter on the maximum height and distance
achieved by the bottle rocket. Finally, students were asked to pick a set of these four parameters
such that the bottle rocket would achieve a maximum distance of 75 meters, with an error of 1
meter. Subsequently, I wrote a MATLAB script and a set of corresponding functions to model
the trajectory of the rocket, and was able to successfully match the verification. Regarding
the four parameters, I found that increasing the initial pressure, decreasing the initial volume
of water inside the bottle, and decreasing the coefficient of drag from the initial conditions
provided in the verification will increase the rocket’s maximum height and distance. However,
decreasing the initial pressure of air inside the bottle, increasing the initial volume of water
inside the bottle and increasing the coefficient of drag from the given initial conditions in the
verification document will decrease the rocket’s maximum height and distance. As a caveat
to the above statement, I found that decreasing the initial volume of water in the rocket only
increased its maximum distance up to a certain point, after which it actually decreased the
maximum distance. Regarding the launch angle, I discovered that the given angle of 45 degrees
was already optimal, and either increasing or decreasing the angle will lead to a suboptimal
maximum height despite being capable of increasing the maximum distance. Finally, the set
of parameters I discovered would allow me to obtain a maximum distance of 75 meters was an
initial air pressure of 450 kPa, a launch angle of 45 degrees, a coefficient of drag of 0.45, and
an initial volume of water of 0.00063 cubic meters.
I. Nomenclature
mR = mass of rocket
a = acceleration of the rocket, with a vector component in the x and z direction
F = thrust, with a vector component in the x and z direction
D = drag, with a vector component in the x and z direction
g = gravitational acceleration, where the x component is 0 m/s
2
and the z component is -9.81m/s
2
V = velocity of the rocket, with a vector component in the x and z direction
H = the heading of the rocket at an instant in time.
D = the drag force acting on the rocket
CD = drag coefficient of the rocket
AB = cross-sectional area of the bottle
P = pressure of air inside the bottle
q = dynamic pressure of air inside the bottle
cd = discharge coefficient
ρw = density of water
P
i
air = initial pressure of air inside the bottle
v
i
air = initial volume of air inside the bottle
T
i
air = initial temperature of air inside the bottle
At = area of cross section at throat of the bottle
∗Undergraduate Student, Aerospace Engineering
mÛR = rate of change of the mass of the rocket
mB = mass of the empty bottle
P? = critical pressure of air inside the bottle
Ve = velocity of air exiting the bottle
Te = temperature of air exiting the bottle
vB = total volume of bottle
ρe = density of air exiting the bottle
Me = mach number of air exiting the bottle
Pa = ambient pressure of air outside the bottle
T = temperature of air inside the bottle
ρ = density of air inside the bottle
γ = ratio of specific heats
R = gas constant for air
mair Û = rate of change of the air inside the bottle
Pend = pressure of air inside the bottle at the end of phase 1
Tend = temperature of air inside the bottle at the end of phase 1
ρa = ambient density of air outside the bottle
P0 = initial total pressure of air outside the bottle
v0 = initial volume of air inside the bottle
m
i
air = initial mass of air inside the bottle
m
i
R
= initial mass of rocket
dv/dt = rate of change of volume of air inside the rocket with time
II. Introduction
Õ
Forces = mR ∗
”
ax
az
#
= mRVÛ = F − D + g (1)
h =
v
|v|
,
vx q
v
2
x + v
2
z
,
vz q
v
2
x + v
2
z
(2)
D = qCD AB =
ρa
2
V
2CD AB (3)
m
i
air =
P
i
air v
i
air
RTi
air
(4)
dv
dt
= cdAtVe = cdAt
s
2(P − Pa)
ρw
= cdAt
s
2
ρw
[P0(
v
γ
0
v
γ
) − Pa] (5)
P
P
i
air
= (
v
i
air
v
)
γ
(6)
F = mVÛ e =
s
2cd(P − Pa)
ρw
(7)
mÛ R = −mÛ = −ρwcdAtVe = −cdAt
p
2ρw(P − Pa) (8)
m
i
R + R = mB + m
i
air + m
i
water = mB + ρw(vB − v
i
air ) + (
P
i
air
RTi
air
)v
i
air (9)
Pend = P
i
air
v
i
air
vB
γ
;Tend = T
i
air
v
i
air
vB
γ−1
(10)
2
P
Pend
=
mair
mi
air
γ
(11)
ρ =
mair
vB
;T =
P
ρR
(12)
P? = P
2
γ + 1
γ/(γ−1)
(13)
Te =
2
γ + 1
T; ρe =
Pe
RTe
; Pe = P?;Ve =
p
γRTe (14)
Ve = Me
p
γRTe (15)
P
Pa
= 1 + (
γ − 1
2
M2
e
)
γ/(γ−1)
;
T
Te
= 1 +
γ − 1
2
M2
e
; ρe =
Pa
RTe
(16)
F = mÛ airVe + (Pe − Pa)At (17)
mair Û = cd ρeAtVe; mÛR = −mair Û = −cd ρeAtVe (18)
T
his project is meant to serve a preview to the the Bottle Rocket Lab that students will complete in ASEN 2004.
Students will write the 2D code that analyzes the trajectory of the rocket in ASEN 2012 and then in ASEN 2004 the
code written for this project will be adapted to 3D and additional factors will be considered. In both cases, the goal is
same: the bottle rocket must be launched from the test stand with the given set of initial conditions and touch the ground
at distance of 75 m from the test stand.
However, before going any further, it important introduce what a “bottle rocket” is. A bottle rocket is a simple rocket
typically made out of an empty 2-liter soda bottle. The bottle is filled with water and pressurized, before being released.
The water and later air that is expelled out of the end of the bottle rocket produces thrust and drives the rocket through
the air.
The trajectory of the bottle rocket can be modeled using Newton’s 2nd Law of motion in two dimensions, the
horizontal (x direction) and the vertical (z direction) using equation 1. Note here that the net force depends on the thrust
produced by the rocket, the drag acting on the rocket, and in the case of the z direction, the acceleration due to gravity.
If I can find what each of these force components are, then I can use ODE45 to solve for the acceleration, velocity, and
position at any given time in the rocket’s flight. In fact, this is exactly what happens.
Drag and thrust vary depending on the direction, or “heading” of the rocket’s flight. This heading can be found
using the equation 2. The drag force acting on the rocket can be calculated using equation 3 at any time during its flight.
The drag coefficient typically varies from 0.3 to 0.5 depending on the aerodynamics properties of the bottle.
Equation 4 is used to calculate the initial mass of air inside the bottle, where R = 287 J/kgK.
The rocket flight can be separated into 3 distinct phases. In the first phase, water is being expelled out of the end of
the bottle rocket, producing thrust. During this phase, equation 5 can be numerically integrated by ODE45 to find the
volume of air inside the bottle at any time during phase 1. With these volume values, we can then calculate the air
pressure inside the rocket using equation 6, where the specific heat ratio gamma is equal to 1.4. Then, equation 7 can be
used to calculate the thrust produced by the rocket at any time during phase 1. In addition, equation 8 can be used to
calculate the rate of change of the mass of the rocket during phase 1. Equation 9 can be used to calculate the initial mass
of the rocket. These formulas will prove very useful later on for use with ODE45.
In the second phase of the flight, all of the water has been expelled from rocket throat. Instead, the pressurized air
inside the bottle is being expelled to produce thrust. In that case, to find the thrust produced by the rocket, we must
first calculate the pressure and temperature of the air inside the rocket at the end of phase 1 using the two formulas
in equation 10. We can then use equation 11 to calculate the pressure of the bottle rocket at any time during phase 2,
and equation 12 to calculate the density and temperature. An important note to make here is that the 2nd thrust phase
can actually be further subdivided into 2 phases: one with choked flow, and one without choked flow. To determine
whether or not the rocket’s flow is choked, use equation 13 to calculate the critical pressure at any altitude. If the critical
pressure is greater than the ambient pressure, then the flow is choked and the three formulas in equation 14 can be used
3
to calculate the exit velocity. If the critical pressure is less than the atmospheric pressure, then the flow is not choked,
the exit pressure is equal to the ambient pressure, and the exit velocity can be calculated using equation 15, where the
exit Mach number and temperature can be calculated using the formulas in equation 16. Then, the thrust produced by
the rocket can be calculated using equation 17. The two formulas in equation 18 can be used to find both the rate of
change of the mass of air in the rocket and the rate of change of the mass of the rocket, which are identical.
Finally, in the third phase of flight, dubbed the “ballistic phase”, the rocket is no longer producing thrust and acts as
a projectile flying through the air. As expected, here, the thrust is zero, as are the rates of change of the mass of the
rocket and of the bottle.
III. Methodology
To complete the objective, one script: “main”, and two functions: “rocket” and “ThrustVec” were created.
“Main’s” overall purpose is to call the ODE45 function using the “rocket function” and a given time interval and
initial conditions as input. It runs the “ThrustVec” function to produce a separate vector of thrust values separate from
ODE45. Finally, it uses the outputs of ODE45 and the “ThrustVec” function to plot the trajectory and thrust profile of
the rocket.
The “rocket” function’s job is to determine the phase of the rocket at at any given time and to use all of the equations
defined in the introduction to determine a set of 5 differential values for: the x and z position, the x and z velocity,
the volume of air in the bottle, the mass of air inside the bottle, and the mass of the rocket, and then outputs these
differentials to ODE45 in “main”. ODE45 then numerically integrates these differentials to calculate the trajectory of
the rocket, among other things.
The “ThrustVec” function’s job is to determine the phase of the rocket and calculate the thrust of the rocket given a
value for the mass of air in the rocket and volume of air inside the rocket. It then outputs the thrust value to “main” for
explicit use for plotting. The algorithms for each of the functions is defined below.
“Main” script algorithm
1) Define global variables, using initial conditions determined by the user. This includes calculations for the initial
mass of the rocket, the initial mass of air inside the rocket, and the pressure and temperature of the air inside the
bottle at the time all of the water is expelled.
2) Build initial conditions vector. Should have values for the initial x position, z position, x velocity, z velocity,
volume of air in the bottle, mass of air in the bottle, and mass of the rocket.
3) Call ODE45 using the “rocket” function, which contains calculations for the rates of each of the 5 parameters
included in the initial conditions vector. Set the time interval from 0 seconds to 5 seconds, and make sure to
supply ODE45 with the initial conditions vector built earlier.
4) Parse the output vector for ease of graphing. For example, all of the distances and heights calculated by ODE45
should be stored independently from one another in their own separate vectors.
5) Call the “ThrustVec” function to produce a set of thrust values for plotting purposes. Its internals will look
almost identical to the “rocket” function, missing only the calculation for each of the rates. This is done due to
problems that arise when trying to a build a vector of thrusts within the ODE45 function.
6) Find the maximum distance using the distance values outputted by ODE45.
7) Find the maximum height using the height values outputted by ODE45.
8) Plot the height of the rocket vs. its distance using the values outputted by ODE45. Make sure it is formatted
properly.
9) Plot the thrust of the rocket vs. time using the values outputted by ODE45. Make sure that it is formatted
properly.
“Rocket” function algorithm
1) Retrieve all necessary global variables from main. There is no need to redefine them.
2) Determine the heading of the rocket. There are two different calculations for heading of the rocket depending on
whether the rocket is on the test stand.
3) Calculate the pressure of air inside the rocket assuming the rocket is in either the 2nd thrust stage 2 or the ballistic
phase. This pressure will be compared to the atmospheric pressure to determine whether the rocket is in the 2nd
thrust phase or in the ballistic phase. To perform this calculation, use equation 11 in the project description.
4
4) Determine if the rocket is in thrust phase 1 by checking if volume of air in the rocket is less than the volume of
the rocket. Thrust phase 1 is defined by water being expelled from the end of the bottle rocket as thrust. It ends
when there is no more water left inside the bottle, and thus the air inside the rocket takes up the rocket’s entire
volume. If the rocket is in phase 1:
1) Use equation 5 to calculate the change in the volume of air in the rocket with time.
2) Set the change in mass of air in the rocket as 0. This is because during the 1st thrust phase, only water is
being expelled out the end.
3) Calculate the pressure of air inside the rocket using equation 6.
4) Use this calculated pressure value in conjunction with equation 8 to calculate the rate of change of the
mass of rocket in the bottle with time.
5) Use equation 7 to calculate the thrust of the rocket in phase 1.
5) Determine if the rocket in phase 2. If the rocket is in phase 2, then not only must the volume of air in the rocket
equal the volume of the rocket, but the pressure of air inside the bottle must also be greater than atmospheric
pressure. This pressure differential is what causes air to be expelled out of the end of the rocket in phase 2. If the
rocket is in phase 2:
1) Set the change of volume of air with time as 0. This is because in phase 2, there is only air left inside
the bottle. The volume of this air does not change throughout the duration of flight, only its pressure.
Otherwise a vacuum would be created.
2) Find the density of air inside the bottle using equation 12a.
3) Find the temperature of air inside the bottle using equation 12b.
4) Find the critical pressure of air inside the bottle using equation 13.
5) Determine if the flow is choked by comparing the critical pressure to the ambient pressure. If the critical
pressure is the larger of the two, then the flow is choked:
1) Set the exit pressure equal to the critical pressure
2) Find the exit temperature using equation 14a.
3) Find the exit density using equation 14b.
4) Use these values to calculate the exit velocity using equation 14c.
6) Otherwise the flow is choked:
1) Set the exit pressure equal to the ambient pressure.
2) Find the exit Mach number using equation 16a.
3) Find the exit temperature using equation 16b.
4) Find the exit density using equation 16c.
5) Find the exit velocity using equation 15.
7) Find the rate of change of the mass of air in the rocket using equation 18.
8) Find the thrust of the bottle rocket using equation 17.
9) Change the sign of the rate of change of mass of air in the rocket so that it is negative. It is initially
positive as to prevent the calculation of a negative thrust. However, from intuition, we know that the rate
of change of mass of air in the rocket should be negative because the mass of air in the bottle is decreasing
as its being jettisoned out the end as thrust. Hence the sign change.
10) Set the rate of change of the mass of the rocket equal to the rate of change of the mass of air inside the
rocket. Since at this point the only thing changing about the rocket is the amount air inside of it, it makes
sense that if the mass of air in the rocket is decreasing, the mass of the rocket is decreasing by an identical
amount.
6) If the rocket is neither in phase 1 nor phase 2, then it must be in phase 3, the ballistic phase.
1) Set the rate of change of the volume of air inside the rocket as zero. This is because once the water has
been expelled, the volume of air inside the bottle rocket will not change. Set the rate of change of the
mass of air inside the rocket as zero. In the ballistic phase air is no longer being expelled from the rocket.
2) Set the rate of change of the mass of the rocket to zero. If neither air nor water is being expelled from the
rocket, its mass will not change.
3) Set the thrust equal to zero. In the ballistic phase, no thrust is being produced. Hence the name.
7) Calculate the drag force acting on the rocket using equation 3.
8) Set the rate of change of the distance x equal to the current component of velocity in the x direction.
9) Set the rate of change of the height z equal to the current component of velocity in the z direction.
10) Use the calculated thrust, drag, heading, and mass of air in the rocket to calculate the x component of acceleration
5
using equation 1.
11) Use the calculated thrust, drag, heading, and mass of air inside the rocket to calculate the z component of
acceleration using equation 1.
12) Transpose the output vector as required by ODE45.
“ThrustVec” Algorithm
1) Retrieve all necessary global variables from main. There is no need to redefine them.
2) Calculate the pressure of air inside the rocket assuming the rocket is in either the 2nd thrust stage or the ballistic
phase. This pressure will be compared to the atmospheric pressure to determine whether the rocket is in the 2nd
thrust phase or in the ballistic phase. To perform this calculation, use equation 11 in the project description.
3) Determine if the rocket is in thrust phase 1 by checking if volume of air in the rocket is less than the volume of
the rocket. Thrust phase 1 is defined by water being expelled from the end of the bottle rocket as thrust. It ends
when there is no more water left inside the bottle, and thus the air inside the rocket takes up the rocket’s entire
volume. If the rocket is in phase 1:
1) Calculate the pressure of air inside the rocket using equation 6.
2) Use equation 7 to calculate the thrust of the rocket in phase 1.
4) Determine if the rocket in phase 2. If the rocket is in phase 2, then not only must the volume of air in the rocket
equal the volume of the rocket, but the pressure of air inside the bottle must also be greater than atmospheric
pressure. This pressure differential is what causes air to be expelled out of the end of the rocket in phase 2. If the
rocket is in phase 2:
1) Find the density of air inside the bottle using equation 12a.
2) Find the temperature of air inside the bottle using equation 12b.
3) Find the critical pressure of air inside the bottle using equation 13.
4) Determine if the flow is choked by comparing the critical pressure to the ambient pressure.
5) If the critical pressure is the larger of the two, then the flow is choked:
1) Set the exit pressure equal to the critical pressure
2) Find the exit temperature using equation 14a.
3) Find the exit density using equation 14b.
4) Use these values to calculate the exit velocity using equation 14c.
6) Otherwise the flow is choked:
1) Set the exit pressure equal to the ambient pressure
2) Find the exit Mach number using equation 16a.
3) Find the exit temperature using equation 16b.
4) Find the exit density using equation 16c.
5) Find the exit velocity using equation 15a.
7) Use the values calculated above to find the thrust of the bottle rocket using equation 17.
5) If the rocket is neither in phase 1 nor phase 2, then it must be in phase 3, the ballistic phase.
1) Set the thrust equal to zero. In the ballistic phase, no thrust is being produced. Hence the name.
6) Output the calculated thrust value.
IV. Results
Table 1 lists and compares the maximum distance and maximum height achieved by the verification case vs. the
actual case.
Table 2 lists and compares the 4 dependence parameters: initial pressure of air, initial volume fraction, drag
coefficient, and launch angle defined by the verification case vs. the actual case.
Table 3,4,5,and 6 show how the the maximum height and distance obtained by the rocket varies in regards to the 4
dependence parameters, determined by independently varying each with all other parameters held constant.
Figure 1 and 2 show a plot of the trajectory of the bottle rocket and its thrust profile using the initial conditions
provided in the verification document. In the thrust profile, the transition between phase 1 and phase 2 is indicated by a
red asterisk. The transition between phase 2 and phase 3 is indicated by a green asterisk.
Figure 3 and 4 show a plot of the trajectory of the bottle rocket and its thrust profile using the chosen initial
dependence parameters stated above. In the thrust profile, the transition between phase 1 and phase 2 is indicated by a
red asterisk. The transition between phase 2 and phase 3 is indicated by a green asterisk.
6
Verification Case Actual Case
Maximum Distance (m) 60.0652 75.0089
Maximum Height (m) 17.2912 24.7148
Table 1 Table comparing maximum distance and height for verification case vs. actual case
Verification Case Actual Case
Initial Pressure of Air (Pa) 428160 449660
Initial Volume Fraction (cubic meters) 0.001 0.00063
Drag Coefficient 0.5 0.45
Launch Angle (degrees) 45 45
Table 2 Table comparing the 4 dependence parameters between the verification case and the actual case
Test Number Initial Pressure of Air (Pa) Maximum Distance (m) Maximum Height (m)
Base Case 428160 60.0652 17.2912
1 438160 61.0419 17.9070
2 418160 58.2294 16.6242
3 449660 63.1078 18.6443
Table 3 Table showing the effect varying the initial air pressure in the bottle rocket has on its maximum
distance and height.
Test Number Initial Volume Fraction (cubic meters) Maximum Distance (m) Maximum Height (m)
Base Case 0.001 60.0652 17.2912
1 0.0012 47.0676 11.4874
2 0.0005 67.6990 22.9345
3 0.00063 68.7100 22.4108
Table 4 Table showing the effect varying the initial volume fraction in the bottle rocket has on its maximum
distance and height.
Test Number Drag Coefficient Maximum Distance (m) Maximum Height (m)
Base Case 0.5 60.0652 17.2912
1 0.7 51.1383 15.6022
2 0.2 84.3699 21.0816
3 0.45 63.5564 17.8033
Table 5 Table showing the effect varying the coefficient of drag of the bottle rocket has on its maximum distance
and height.
Test Number Launch Angle Maximum Distance (m) Maximum Height (m)
Base Case 45 60.0652 17.2912
1 90 7.4493 E-15 36.8884
2 30 54.7285 8.1101
3 20 39.8513 3.1604
Table 6 Table showing the effect the launch angle has on the maximum distance and height of the bottle rocket.
7
Fig. 1 Plot of bottle rocket trajectory for verification case.
Fig. 2 Plot of bottle rocket thrust profile for verification case.
Fig. 3 Plot of bottle rocket trajectory for actual case.
8
Fig. 4 Plot of bottle rocket thrust profile for actual case.
V. Discussion
After investigating the 4 design parameters: the initial pressure of air, the initial volume fraction, the drag coefficient,
and the launch angle, and how varying each will affect the maximum distance and maximum height traveled by the
rocket, the following observations were made:
Effect of initial pressure of air inside the bottle:
• As shown by table 3, increasing the initial pressure (by a large magnitude, say 10000 Pa) inside the bottle will
increase both the maximum distance and the maximum height. Note that a large pressure difference is required to
see any effect on either the height or the distance. This makes sense intuitively. For example, if I fill up a balloon
with as mnuch air as I can, and then release it, it will fly much farther than a deflated balloon, which might not fly
at all. In other words, the initial pressure of air inside the bottle determines its “thrust production potential” in the
2nd phase.
• Again shown by table 3, decreasing the initial pressure (by a large magnitude, say 10000 Pa) inside the bottle will
decrease both the maximum distance and the maximum height. Note that a large pressure difference is required to
see any significant effect on either the height or the distance. This makes sense for the same reason listed above.
Effect of initial volume of water inside the bottle:
• As shown by table 4, increasing the initial volume of water inside the bottle will decrease both the maximum
distance and maximum height. Even a small change in the initial volume can have a significant effect on the
trajectory of the rocket. I also notice that as I increase the volume of water inside the bottle, the first thrust phase
(water expulsion) becomes “longer” and the 2nd thrust phase (air expulsion) becomes “shorter” until it eventually
becomes nonexistent. At that point the code stops functioning as well. This should make sense. Water is heavy,
and since the initial pressure of air inside the bottle is being held constant, the increase in the mass of the rocket
due to gravity will be a much greater influence to the rocket’s trajectory than any additional thrust it could have
provided.
• Again shown by table 4, decreasing the initial volume of water inside the bottle will increase both the maximum
distance and maximum height up to a certain point. In my testing, I found that the maximum distance and height
increase as the initial volume of water inside the bottle decreases, reaching peak gains at around 0.00063 cubic
meters. Past this point, decreasing the initial volume of water inside the bottle will actually decrease the maximum
distance and height reached by the rocket from the previously established peak. I also notice that as I decrease the
volume of water inside the bottle, the first thrust phase (water expulsion) becomes “shorter” and the 2nd thrust
phase (air expulsion) becomes “longer” until it eventually becomes nonexistent. At that point the code stops
functioning as well. This makes sense because there must be some ideal combination of water and air inside the
bottle rocket to achieve maximum distance. I say this because otherwise, it would be much more common to see
bottle rockets with only air or only water. Conceptually, we must consider that with regards to both air and water,
9
increasing the initial amount of either substance in the bottle may increase the thrust produced by the rocket but
will also increase its weight. It is a balancing act.
Effect of drag coefficient:
• As shown by table 5, increasing the coefficient of drag will decrease both the maximum distance and the maximum
height of the rocket. This makes sense intuitively because the coefficient dag is proportional to the magnitude of
drag acting on an object. The greater the coefficient of drag, the more drag will be experienced by the object. If
the rocket is subject to greater drag forces, the effectiveness of its thrust, and thus its performance will be severely
hindered.
• Again shown by table 5, decreasing the coefficient of drag will increase both the maximum distance and the
maximum height of the rocket. This also makes sense intuitively for the reasons discussed above.
Effect of launch angle:
• As shown by table 6, increasing the launch angle will increase the maximum height and decrease the maximum
distance. This should make sense intuitively to anyone who has ever thrown a ball. When the launch angle is high,
all of the net force produced by the thrust is being used to increase the velocity component of the rocket in the z
direction. As a result, it will fly higher, but cannot go far.
• Again shown by table 6, decreasing the launch angle will decrease the maximum height and decrease the maximum
distance. This time, when the launch angle is low, all of the net force produced by the thrust is being used to
increase the velocity component of the rocket in the x direction. However, because the rocket is flying so low to
the ground, and because of the presence of gravity accelerating the rocket in the -z direction, the rocket cannot go
very far before hitting the ground.
• Also, harking back to Physics class, we should know that the optimum angle for launching a projectile is 45
degrees as it optimizes the trajectory of the rocket for distance.
Given these observations, I experimented heavily to find a combination of these 4 parameters that would allow the
rocket to fly a distance of exactly 75 meters, as evident by tables 3-6 as well as the comments inside the MATLAB
scripts I wrote. In the end, as shown in table 2 and table 1, I found the following successful combination: an initial
air pressure of 450 kPa, a launch angle of 45 degrees, a coefficient of drag of 0.45, and an initial volume of water of
0.00063 cubic meters, which give the rocket a maximum height of 24.7148 meters and a maximum distance of 75.0089
meters, which is well within the 1 m error bounds prescribed by the lab document.
Finally, it is perhaps useful to discuss the shape of the plots for both the verification case and the test case. In general,
we see from figures 1 and 3 that the trajectory of the bottle rocket follows a roughly parabolic shape. This makes sense
as the bottle rocket is essentially a glorified projectile capable of producing a little additional thrust at the beginning of
launch. Figures 2 and 4 show that the thrust profile matches what we’d expect based on the theory discussed in the
introduction. Note that in when comparing figure 4 to figure 2, we see that figure 4 has a much shorter phase 1 and a
longer phase 2. This harks back to the previous paragraphs talking about the effect of the initial volume fraction of
water on the trajectory of the rocket.
VI. Conclusion
I was able to successfully write a MATLAB program to model the trajectory of a bottle rocket, given my code passed
the verification test. However, more importantly, I was able to carefully study each of the 4 main flight parameters:
the initial pressure of air, the initial volume fraction of water, the drag coefficient, and the launch parameter on the
maximum height and distance achieved by the bottle rocket, and deduce their effect on the maximum distance and height
achieved by the rocket. More specifically, distance and height have a direct relationship with initial pressure, and an
inverse relationship with the initial volume of water inside the bottle and the coefficient of drag. Again, it must be noted
that decreasing the initial volume of water in the rocket only improved its distance up to a certain point, after which it
actually decreases the distance. Regarding the launch angle, I discovered that the given angle of 45 degrees was already
optimal, and either increasing or decreasing the angle will lead to a suboptimal maximum height despite being capable
of increasing the maximum distance. Finally, the set of parameters I discovered would allow me to obtain a maximum
distance of 75 meters was an initial air pressure of 450 kPa, a launch angle of 45 degrees, a coefficient of drag of 0.45,
and an initial volume of water of 0.00063 cubic meters.
10
References
Jackson, J., “ASEN2012 – Project2 – Bottle Rocket Design – 2017 NEW FORMULATION,” Fall 2017.
Jackson, J., “VerificationCaseForProject2,” Fall 2017.
Appendix
Explicit Use of Engineering Method for Algorithm Development (General)
• Problem: To prepare students for the Bottle Rocket Design and Performance Analysis Lab in ASEN 2004 and to
help them understand how the performance of the bottle rocket depends on different “design parameters”.
• Knowns: There are three phases of flight. A set of given equations to help me calculate the flight trajectory of the
bottle rocket in each of the three phases. The initial velocity of the rocket is 0 m/s. The test stand is 0.5 meters
in length. The initial height of the rocket is 0.25 m. There are four parameters that affect the performance of
the bottle rocket: the initial pressure of air inside the bottle, the initial volume of water in the bottle, the drag
coefficient, and the launch angle.
• Find: The flight parameters that will allow the bottle rocket to land within 1 meter of a 75-meter marker. I also
need to include a plot of the trajectory and a plot of my thrust profile with time over the flight, and markers on
the plot to indicate where the transition between the three phases of flight occur. I also must investigate the 4
design parameters to determine how varying each will affect the range and height of the rocket. I also will need to
write a report to document my findings. Finally, I am required to verify my code by matching it to a provided
“verification case”.
• Assumptions: ODE45 can be used to model the trajectory of the rocket.
• Sketch: (See Figure 1)
Fig. 5 Sketch
: Free Body Diagram of Bottle Rocket
• Fundamentals: The project description contains 27 different equations to to be used to model the trajectory of
the rocket at each of the 3 phases of flight. However, all 27 equations resolve around one fundamental concept:
Newton’s 2nd Law. Newton’s 2nd Law says that F = ma. In our case, the acceleration has both an x and z
component, and the net force is dependent on three values: the thrust produced by the rocket, the drag acting on
the rocket, and the force due to gravity in the z direction. In other words, F = ma = F – D + g.
• Alternatives: While we were not explicitly provided an alternative, I suppose it is possible to try to formulate a
single equation for the trajectory of the rocket based on experimentation alone. The process used in that case will
be identical to dimensional analysis method shown in class.
• Steps:
1) Use the given formulas provided in the lab description to write 2 programs: a “rocket” function used to
feed into ODE45, and a main function to run ODE5.
2) Verify the code functions properly by running the verification case and comparing it with the answers
provided in the lab description.
3) Take turns varying each of the 4 parameters (the initial pressure of air inside the bottle, the initial volume of
water in the bottle, the drag coefficient, and the launch angle), and take note how each affect the trajectory
of the rocket.
11
4) Design a set of parameters so that the bottle rocket falls within 1 meter of the 75 meter target.
5) Compile all findings in a report.
• Check: The verification case was successfully passed and the code was checked over by a TA.
• Makes Sense?: Both the trajectory plot and thrust profile appear reasonable.
Explicit Use of Engineering Method for Algorithm Development (main script)
• Problem: To prepare students for the Bottle Rocket Design and Performance Analysis Lab in ASEN 2004 and to
help them understand how the performance of the bottle rocket depends on different “design parameters”.
• Knowns: There are three phases of flight. A set of given equations to help me calculate the flight trajectory of the
bottle rocket in each of the three phases. The initial velocity of the rocket is 0 m/s. The test stand is 0.5 meters
in length. The initial height of the rocket is 0.25 m. There are four parameters that affect the performance of
the bottle rocket: the initial pressure of air inside the bottle, the initial volume of water in the bottle, the drag
coefficient, and the launch angle.
• Find: A script that uses ODE45 along with the “rocket” function and the “ThrustVec” function to calculate and
plot the trajectory and thrust profile of a bottle rocket.
• Assumptions: The script must use ODE45.
• Sketch: (See Figure 1)
Fig. 6 Sketch
: Free Body Diagram of Bottle Rocket
• Fundamentals: The project description contains 27 different equations to to be used to model the trajectory of
the rocket at each of the 3 phases of flight. However, all 27 equations revolve around one fundamental concept:
Newton’s 2nd Law. Newton’s 2nd Law says that F = ma. In our case, the acceleration has both an x and z
component, and the net force is dependent on three values: the thrust produced by the rocket, the drag acting on
the rocket, and the force due to gravity in the z direction. In other words, F = ma = F – D + g.
• Alternatives: While we were not explicitly provided an alternative, I suppose it is possible to try to formulate a
single equation for the trajectory of the rocket based on experimentation alone. The process used in that case will
be identical to dimensional analysis method shown in class.
• Steps:
1) Define Global Variables
2) Build Initial Conditions Vector
3) Call ODE45 with the “rocket” function to determine the trajectory of the bottle rocket
4) Parse output vector for ease of graphing
5) Call “ThrustVec” function to produce a set of thrust values independent of ODE45 for ease of graphing.
6) Find the maximum distance
7) Find the maximum height
8) Plot Thrust vs. Time
• Check: The verification case was successfully passed and the code was checked over by a TA.
• Makes Sense?: Both the trajectory plot and thrust profile appear reasonable.
Explicit Use of Engineering Method for Algorithm Development (rocket function)
12
• Problem: To prepare students for the Bottle Rocket Design and Performance Analysis Lab in ASEN 2004 and to
help them understand how the performance of the bottle rocket depends on different “design parameters”.
• Knowns: There are three phases of flight. A set of given equations to help me calculate the flight trajectory of the
bottle rocket in each of the three phases. The initial velocity of the rocket is 0 m/s. The test stand is 0.5 meters
in length. The initial height of the rocket is 0.25 m. There are four parameters that affect the performance of
the bottle rocket: the initial pressure of air inside the bottle, the initial volume of water in the bottle, the drag
coefficient, and the launch angle.
• Find: A function that can use the equations provided inside the project description to accurately model the
trajectory of the bottle rocket.
• Assumptions: The function must be designed to work with ODE45.
• Sketch: (See Figure 1)
Fig. 7 Sketch
: Free Body Diagram of Bottle Rocket
• Fundamentals: The project description contains 27 different equations to to be used to model the trajectory of
the rocket at each of the 3 phases of flight. However, all 27 equations resolve around one fundamental concept:
Newton’s 2nd Law. Newton’s 2nd Law says that F = ma. In our case, the acceleration has both an x and z
component, and the net force is dependent on three values: the thrust produced by the rocket, the drag acting on
the rocket, and the force due to gravity in the z direction. In other words, F = ma = F – D + g.
• Alternatives: While we were not explicitly provided an alternative, I suppose it is possible to try to formulate a
single equation for the trajectory of the rocket based on experimentation alone. The process used in that case will
be identical to dimensional analysis method shown in class.
• Steps:
1) Retrieve Global Variables
2) Determine Heading of Rocket
3) Determine Phase of Rocket
4) Determine Thrust Produced by Rocket
5) Determine Drag Felt by Rocket
6) Use Thrusts and Drag to Calculate Acceleration of Rocket in x and z directions.
7) Calculate All Other Rates Required by ODE45
8) Output All Calculated Rates
• Check: The verification case was successfully passed and the code was checked over by a TA.
• Makes Sense?: Both the trajectory plot and thrust profile appear reasonable.
13
Fig. 8 Main Program Flow Chart
14
Fig. 9 Subroutine 1: “rocket” Function Flow Chart
Fig. 10 Subroutine 2: “ThrustVec” Function Flow Chart
15
Fig. 11 Secondary Program: Verification Case Flow Chart
16