Model Rocketry

Reference / Paper · 2021

Peak of Flight #544: Graphing RockSim Data To Compare Simulations

Read the PDF ↗

Apogee Components' Peak of Flight newsletter, issue 544 (2021-03-30).

Author
Tim Van Milligan / Apogee Components
Year
2021
Type
Reference / Paper
Credit
Apogee Components, Inc. (Colorado Springs, CO) — Peak of Flight newsletter
  • peak-of-flight
  • apogee-components
  • model-rocketry

← Back to the Reference Library

Peak of Flight #544: Graphing RockSim Data To Compare Simulations

Apogee Components' Peak of Flight newsletter, issue 544 (2021-03-30).

ISSUE 544 / Mar 30th 2021 IN THIS ISSUE Graphing RockSim Data To Compare Simulations https://www.apogeerockets.com/Rocket-Kits/Skill-Level-3-Model-Rocket-Kits/Ibis Graphing Simulation Data Planning the Simulations By Bobby Potter One limitation with RockSim is that it can’t graph out data from two simulations (or more) so that they can be compared. In this article, we’ll show you how to export the simulation data and then to plot it out in a spreadsheet program like Microsoft Excel (or Google Sheets). This way you’ll be able to compare multiple simulations. In the example we’ll use, we will be plotting a graph that compares launch angles of an Apogee Zephyr flying on an Aerotech G67. More specifically, we want to be able to compare the altitude achieved and how far away the rocket is likely to land at various launch angles. Our end results should look like Figure 1. There’s a saying in data science; “garbage in, garbage out,” and that is equally true with our goals here today. The only difference in each of these simulations should be the launch angle. If each simulation has different weather conditions, different motors and a bunch of other variables changed then our results won’t be able to teach us anything. We won’t know if the results changed because of the different motor we used or if the results actually targeted our launch rod angle (when in reality, both would have an effect). Whenever you are trying to test something, stick to one variable at a time. Keep everything else the exact same between flights. For this example we are running everything off the same launch rod, the same slightly breezy conditions, and with the same motor. We are going to export 4 data sets, the first being a perfectly vertical launch rod, the second being a 10 degree angle, then a 25 degree angle, and finally a 45 degree angle. We know that launching greater than 30° from vertical is against the NAR safety code (https://www.nar.org/safety-information/model-rocket-safetycode/), but the beauty of RockSim is we can do unsafe things within a completely safe virtual environment - for science - of course. Figure 1: Comparative graph showing different launch rod angles and the resulting altitude and distance from the pad www.ApogeeRockets.com/RockSim/RockSim_Information Newsletter Staff Continued on page 3 Writer: Bobby Potter Layout: Derek Villar Cover Artist: Matthew Martinez Proofreader: Michelle Mason Page 2 Issue 544 / Mar 30th, 2021 Graphing Simulation Data Continued from page 2 Exporting the Simulation Data As you can see from Figure 2, I’ve already run our simulations. If this is your first time using RockSim, you can see how to launch a simulation in our video tutorial #1 at https://www.apogeerockets.com/RockSim/RockSim_Video_ Tutorials. It’s important to understand that the information given on this screen is very much like the tip of the iceberg. Each simulation takes thousands of data points for each launch that just aren’t really easily understood by reading them. However, for our chart, we need to collect this data from each of these simulations. Figure 3: Exporting simulation data Figure 2: Simulations with varying launch rod angles Page 3 Start by clicking on the first simulation, with a zero degree angle, then going to File > Export > Simulation Data as seen in Figure 3. Continued on page 4 Issue 544 / Mar 30th, 2021 Graphing Simulation Data Continued from page 3 This will present you with a screen that looks like Figure 4. First, name your file and select where you want to save it. Then select the X and Y axis of our chart, which in our case is altitude and range. RockSim will allow you to export dozens of variables, but we only want those two at this time. Then Click OK. First, we need to import each of our data sets. In Numbers, this means creating 4 tables, one for each set. Figure 5 will show you how to insert a plain table and what the end result should resemble. Figure 5: Inserting tables in Numbers Then we need to import our data to each of these tables. In Numbers, this is a simple drag and drop of the CSV into their respective tables. This will fill your tables with all of the data we need, and should resemble figure 6. Figure 4: The data export interface Repeat this process for each simulation, remembering to give each one a different file name. Creating Comparative Charts I’ll be using the Mac based spreadsheet program Numbers for this example, as that is the spreadsheet software that I know, however the process should be similar in Excel (see RockSim tutorial video #20 at: https://www. apogeerockets.com/RockSim/RockSim_Video_Tutorials). Tim has made a new step-by-step tutorial for doing this process using Google Sheets, since it is a little different. (https://youtu.be/nI5kKz5HDck) Figure 6: All of our data imported into Numbers Continued on page 5 Page 4 Issue 544 / Mar 30th, 2021 Graphing Simulation Data Continued from page 4 Then, we create our chart. Select the “Chart” icon at the top of the page, and select the XY Scatter chart as shown in figure 7. This will add an empty chart to our screen, but we can fill it with our data. Underneath the empty chart you will see a button that says “Edit Chart Data”. After clicking on this you’ll be prompted to select the first data set. Know that the first selection you make will be on the X axis, or the horizontal one. I want the X axis to be range, so I will select the range from the first data set. Click directly above “Range” to automatically select the entire table column. Figure 7: XY Scatter Chart Figure 8: Be sure to uncheck “Share X Values” from the drop down at the top of your first data set collection Then click the little down arrow on your first data set selection and uncheck “Share X Values” as we want to use our data for both axes. Then select your Y axis for the same data set, in this case being our “Altitude” column. At this stage your results should look like Figure 9. Figure 9: Our chart with one data set input Continued on page 6 Apogeerockets.com/Zephyr Page 5 Issue 544 / Mar 30th, 2021 Graphing Simulation Data Continued from page 5 Then we continue to the next data set. Remember, our first selection is the X axis, the second is the Y axis. Repeat this for all 4 data sets. Just click above “Range” then above “Altitude” on each set until your chart has all 4 data sets plotted. As we have our data in 4 different tables, Numbers already knows that these are to be plotted individually. Be sure to click “Done” at the bottom right of your screen when you have each data set in. At this stage, we can change our format and label our axis and rod angles to make things look a bit more professional. These settings can easily be changed by double clicking on what you want to change, and changing the value in the toolbar on the right hand side that appears when you have it selected. What is the Value in this? By being able to compare data sets, you can easily understand all the figures that RockSim is throwing at you. From this graph I can easily tell you how changing the launch rod angle on the Zephyr on a slightly breezy day is going to impact the altitude I can achieve and the distance I will have to walk after the launch. That said, this process can be used for any number of valuable data sets. Want to compare how different launch angles will affect the total duration of your flight? The process is the same. Want to compare the altitude and acceleration of your rocket with different amounts of nose weight? The process is the same. Understanding how to export and analyze your data is the first step in getting a deeper insight into your rocket’s performance, and understanding the why of it all. Figure 10: Our completed chart Star Lift Mega Lander Build It - Launch It - Stick The Landing The Excitement Builds All The Way To Touchdown • Large Size Rocket Flies on the Impressive Mid-Power Motors. • Articulating Lander Legs Fold Up During Launch. • Laser Cut Plywood Parts for a Strong Rocket. • Pre-Slotted Tube Makes Construction Easier. • Vinyl Decal for Visual Appeal. www.ApogeeRockets.com/Rocket_Kits/Skill_Level_5_Kits/Star_Lift_Mega_Lander Page 6 Issue 544 / Mar 30th, 2021