Peak of Flight #16: Exporting Data from RockSim and finding optimum trajectories
Apogee Components' Peak of Flight newsletter, issue 16. Date: undated; published between 2000 and 2005 (from the neighbouring dated issues).
I S S U E
N
E
W
1 6 , A U G
2 0 , 2 0 0 0
S
T
L
E
T
E
R
Exporting Data from RockSim
the Apogee D3 motor, and also the Aerotech D21 for the simulations.
By Tim Van Milligan
In this article, I'm going to try to explain one lesser-known
procedure of exporting data from RockSim. There are a couple
of ways to export, but I like the method described here best.
The reason is, I can control what is being exported; so when it
is time to manipulate data, I have a better handle on how it is
formatted. My particular method is probably the hard way.
You can play around with RockSim, and probably do the same
thing easier.
Why would you want to export data?
Reason: to manipulate it further in a spreadsheet program.
One might want to take certain data and perform more mathematics on it. For example, you could export the mass depletion curves, and the velocity curves. By multiplying these together, you could get a momentum curve (momentum = mass
times velocity), or a kinetic energy curve (kinetic energy =
mass times the square of velocity).
Another reason to export may be to combine the results
of several simulations together. The plotting program of
RockSim can only display the results from one simulation at a
time. So if you wanted to run several different motors in the
same rocket and see the velocity curves on one chart, you'd
have to export the data out and recombine it in a spreadsheet
program.
For this article, I decided I wanted to find the optimum
trajectory of a rocket to yield the greatest distance (the military calls these "ballistic tables"). In the classical physics problem, the effects of drag and thrust duration are always ignored.
But what happens if you don't ignore them. Can you predict
what the results would be?
Well, with RockSim, you can. And the results are very
interesting. If you want to follow along with your own copy
of RockSim, for the simulations listed here, I used the Blue
Streak file that is in the Design folder of RockSim. I then used
To Export the Data:
Before you run the simulation, check all your launch site
parameters. Set the launch rod angle (as measured from vertical), and also reset the simulation sample rate to a low number (around 150 samples/sec), so that you don't overload the
amount of data points generated by the simulation. The 150
samples/sec is a really low number, and for normal simulations, it should be set at a much higher number. Personally, I
don't like to set the number below 300 samples/sec for any
simulation that isn't launched vertically.
When you load the motor, you can type in the delay you
want. I use a pretty high number, say around 20 seconds for a
small rocket motor. The reason is that I want the rocket to
impact the ground before the ejection charge goes off. Otherwise, once the ejection charge fires, the simulation stops.
At this point, you can run the simulation. Then select the
plot button, and set the axes of the graphs to "Distance" for
the x-axis, and " Altitude" for the y-axis. After the graph is
1130 Elkton Drive, Suite A
Colorado Springs, CO 80907 USA
www.ApogeeRockets.com
orders @ApogeeRockets.com
phone 719-535-9335 fax 719-534-9050
Page
1
P
E
A
K
O
F
F
L
I
G
H
T
stored.
7. Click the OK button. This brings you back to the "export box" shown two illustrations above.
8. Click the "Export" button. You'll now be given a choice
how to format the data being stored. The following box appears:
9. Choose "All Data" from the left side.
10. Choose the"Data" button from the right side top.
11. For "Export Style," choose "List.:
12. In the "Delimited" box, choose the "Tab" button.
plotted out; double click on it in any location. The graph
customization menu pops up. It is shown below:
1. Click the export button. This brings up another export
box, which is shown below.
2. Click the "Text/Data Only" button.
3. Click the "File" button.
4. Click the "Browse" button. This will allow you to select the location where the data file will be stored. The "Save
As" screen will now pop up. This is shown above.
5. Type in a name for the data file.
6. You can select which drive and folder the data will be
13. Finally, choose the "Export" button. The data is now
stored.
This may seem like a lot of work, but it gives you a lot of
options of how the data is stored.
The whole reason to export the data, is so that you can
manipulate it further in a spread sheet program. In this instance, I wanted to combine the data from several different
launch simulations. RockSim only allows data for one simulation to be displayed at once. In a spreadsheet program, like
About this Newsletter
You can subscribe “FREE” to receive this e-zine at the Apogee Components web
site (www.ApogeeRockets.com), or sending an email to: [email protected]
with "SUBSCRIBE" as the subject line of the message.
A P O G E E
Page 2
R O C K E T S
PAGE 2
P
E
A
K
O
F
F
L
I
G
H
T
Launch of the Blue Streak model on an Aerotech D21
motor. The optimum launch angle is about 50°.
Launch of the Blue Streak model on an Apogee D3 motor. The optimum launch angle is about 60°.
Microsoft Excel, you can plot the trajectory curves of several
simulations. I'll leave it up to you to read the help file in your
spreadsheet program for combining data sets on a single graph.
It is easy, but it does take a little extra labor. Then you can add
colors and text to make your graph pretty, like the ones shown
below.
In the first graph, I launched the "Apogee Blue Streak"
model (which is in the sample designs, included with the
RockSim software) on a Aerotech D21 motor. After exporting
4 different simulations and combining them in Excel, I got
this graph showing that a launch angle of 60° or 70° to be best
for achieving maximum distance.
For the next set of simulations, I switched motors to the
Apogee Components D3 (long duration burn) motor. This time,
the situation changed dramatically. Now the optimum launch
angle was less around 60 degrees. Also note that the distance
covered is significantly further.
Note: every rocket behaves differently. That is why you
have to use a program like RockSim.
The classical physics problem is to find the optimum angle
for a cannon firing a cannon-ball. In this problem, they always assume a instantaneous explosive force, and no drag. In
that case, the optimum angle is 45 degrees. But, as we can see,
things are a lot different when the thrust force has a given
duration, and drag is also included.
Extra Credit: For additional variety, try varying the wind
speed in the experiment. You can choose to launch with the
wind, or into the wind by changing making the launch angle
in the application settings to a negative number.
It is a lot of fun to run these types of simulations, and you
can see why having a great program like RockSim makes
simple work of a complex situation.
A P O G E E
About the Author:
Tim Van Milligan is the owner of Apogee Components
(http://www.apogeerockets.com) and the curator of the rocketry education web site: http://www.apogeerockets.com/education. He is also the author of the books: "Model Rocket Design and Construction," "69 Simple Science Fair Projects with
Model Rockets: Aeronautics" and publisher of the FREE ezine newsletter about model rockets. You can subscribe to the
e-zine at the Apogee Components web site, or sending an email
to: [email protected] with "SUBSCRIBE" as the subject line of the message.
R O C K E T S
Page
3