Reference / Paper · 2023
Peak of Flight #598: Creating & Using Engine Files for RockSim
Apogee Components' Peak of Flight newsletter, issue 598 (2023-04-25).
- peak-of-flight
- apogee-components
- model-rocketry
Reference / Paper · 2023
Apogee Components' Peak of Flight newsletter, issue 598 (2023-04-25).
Apogee Components' Peak of Flight newsletter, issue 598 (2023-04-25).
ISSUE 598 / APRIL 25TH 2023 IN THIS ISSUE Creating & Using Engine Files for RockSim https://www.apogeerockets.com/Rocket-Kits/Skill-Level-1-Model-Rocket-Kits/Blue-Streak Creating & Using Engine Files for RockSim By Tim Van Milligan With the popularity in Universities of making rocket motors, we thought we’d write a guide for creating an engine file and then loading it into RockSim so that flight simulations can be run. This way you’ll be able to see how your rocket will fly with the rocket motors that you might make. There is one crucial step that you need to do first, before you sit down and read this guide. That is you’ll need to get or create the thrust curve of the rocket motor. RockSim does not generate the thrust curves. A thrust curve is basically just a chart that plots the thrust of the rocket motor on the Y-axis, and the time on the X-axis. To get a thrust curve, you will have to use a rocket engine test stand. It is basically an electronic scale that records the thrust force of the motor from ignition to burnout. There are tons of plans out on the internet that you can copy for your own test stand. There is also software like Burnsim (https://www.burnsim.com/) that will help you generate thrust curves from theoretical data. To be honest, I have not tried it, so I do not know how hard it is to use. Once you have your thrust curve, you can start to put together your engine file. The software you’ll use for this is “EngEdit.” This software comes bundled with RockSim. It is located in the same folder on your computer as the RockSim application. Figure 1: EngEdit is the software that creates motor files for RockSim. When you first open EngEdit, you’ll get a blank screen, like shown in Figure 2. In order to create a new motor file, you have to click the “add new engine” button. Figure 2: To start a new engine file, you need to click the “Add new engine” button. As a side note, the engine files are actually a collection of individual motor files. So for example, instead of storing each of the Estes motors separately (like Estes A3, A10, A8, B4, etc), they are gathered together and stored as one large engine file. This just makes it convenient later because it makes finding individual motors easier. So if you were adding to an existing manufacturer’s file, you would first open that manufacturer’s motor file (ex. Estes.rse) from the File > Open drop-down menu. At that point, you would still click the button “Add new engine,” and the new motor would simply be added to that manufacturer’s collection motor files when you saved it. But on the other hand, you can save each motor file individually, like it was its own manufacturer, and it doesn’t matter to RockSim. The RockSim software will still sort the motors properly regardless of if they are in a collection or all separate. In fact, you could accidentally store an Estes motor in the Aerotech file, and RockSim wouldn’t care. Once the motor files are moved over to RockSim, it takes care of the organization and sorting. Once you have clicked the “Add new engine” button, a small pop-up dialog box will appear, as shown in Figure 3. Newsletter Staff Continued on page 3 Writer: Tim Van Milligan Proofreader: Michelle Mason Layout: Sky Luther Page 2 Issue 598 / April 25th, 2023 Creating & Using Engine Files for RockSim Continued from page 2 The Y-axis will be the thrust, and the X-axis is time. Now you’ll start adding points to the graph. You do this by DOUBLE-CLICKING on the graph with your mouse. Each time you double-click with your mouse, it will add a new point. There are two points that are automatically created after you’ve added your first point in the middle of the graph. They are the 0,0 point and the last point which is max burn time and zero thrust. Figure 3: The dialog Box to add the burn time and peak thrust. This is where you’ll have to look at the thrust curve of your test motor. From your plot of the thrust curve, find the burn time and the highest thrust point, and enter these into the dialog box. If you enter them wrong, don’t worry, you can correct them later. Your goal is to recreate your thrust curve in the graph, as shown in Figure 5. From this data, EngEdit is going to create a graph for you on the bottom of the screen, as shown in Figure 4. Figure 5: Each time you double-click in the graph, it adds a new point. Figure 4: A graph is displayed on the bottom of the screen where you can draw out your thrust curve. Page 3 To move a point, you single-click and drag it around on the graph. The only point you can’t move is the 0,0 point at the bottom left corner. You can drag the end point (burn time, 0) point to adjust the burn time of the motor. But it will always snap to the zero thrust level on the bottom of the graph. Continued on page 4 Issue 598 / April 25th, 2023 Creating & Using Engine Files for RockSim Continued from page 3 Similarly, if you accidentally typed in a peak thrust in the dialog box that was too low, the graph will automatically resize as you drag the highest thrust point higher. How many points should you add? I can’t remember exactly, but to my recollection, it used to be limited to a couple hundred. My philosophy is to use as few as possible in order to accurately match your “normalized” thrust curve. By normalized, I mean to smooth out the thrust curve to eliminate the random noise that always gets measured by a rocket engine test stand. motors, and you averaged out all the spikes and other random noise, you’d end up with a normalized thrust curve. That is what you should match when drawing your thrust curve in EngEdit. Don’t add points just to match the noisy points. It doesn’t make things more accurate, it just requires the processor to do more work. Figure 7: A normalized thrust curve (red line) overlayed on top of the actual measured data. Figure 6: Thrust curve data has random noise in it that should be smoothed out. There is a nifty little program from www.thrustcurve.org that allows you to take a jpg image of your measured thrust curve and to actually trace it (similar to what was just described). The advantage is it is a little quicker because you don’t have to be so careful reading the data from the thrust curve. This program is simply called “Thrust Curve Tracer,” because that is what it actually does. Where does this noise come from? It can come from That Thrust Curve Tracer program will also generate resonance in the measurement system, or from variations engine files, but in the older rasp format (file extension .eng). in the rocket propellant. For example, there may be small voids of air inside the mixed propellant, and when the motor Not to worry though, as both RockSim and EngEdit can read and import these files just fine. burns and it reaches one of these voids, the thrust of the motor will spike up momentarily. But if you have 100 similar Continued on page 5 https://www.apogeerockets.com/Rocket-Kits/Skill-Level-3-Model-Rocket-Kits/Zephyr Page 4 Issue 598 / April 25th, 2023 Creating & Using Engine Files for RockSim Continued from page 4 But you don’t have to use Thrust Curve Tracer if you don’t want to. EngEdit can do the same thing, you’ll have to invest a little more time matching the thrust curve. As you’re adding and moving points around on the thrust curve in the bottom of the screen, you’ll notice that the numbers in the middle of the screen are changing (see Figure 8). Once the thrust curve is done, you’ll enter the information in the top-middle section of the screen. These are the physical parameters of the rocket motor, like its dimensions and weights. A lot of times, you don’t know the propellant mass of the motor. You only know the initial mass and the final mass of the motor after it has been test fired. So you can simply compute the propellant mass by subtracting the final mass from the initial mass. You really don’t have to worry about the mass of the delay, ejection charge, or the cap that holds the ejection charge in the motor. They are relatively insignificant, which is why we lump them in the propellant mass. The Ejection Delays do have a special format that you have to be aware of. If your motor could have multiple ejection delays (like the Estes C6-0, C6-3, C6-5, and C6-7), you would simply separate the values by a comma. So you’d enter them as: 0,3,5,7 Figure 8: The values in the middle of the screen are automatically calculated based on the position of the points in the graph. These numbers are auto-calculated based on the position of the points in the graph below. The most important one, in my opinion, is the “Total Impulse” of the motor. So if you’re trying to match an official thrust curve of a motor, you may have to slightly reposition the points on the graph so that the calculated Total Impulse is equal to the officially published value. If your motor doesn’t have an ejection charge, this is called a “Plugged” motor. To enter that in the list, you’d use the letter “P”. So continuing our example, the motor might have for its ejection delays: 0,3,5,7,P To be honest, RockSim allows you to put in a “Custom” delay when you run a simulation, so putting delays in the motor file really isn’t that important anymore. But it makes it convenient to let other users know what delays are available. The Manufacturer is an optional field. By default this field is set to Unknown. You can type in your own company name if you wish. You don’t have to select from the available manufacturer names. The last parameter you have to enter is the Engine Code (also known as the motor name). Theoretically, you can name it anything you want. RockSim doesn’t care. It calculates the flight of the rocket based on the other parameters of the engine file. The Engine Code is more for allowing other rocketeers to get a general idea of what size and performance this new motor has without having to run a simulation. Figure 9: The physical parameters of the rocket engine. Page 5 Continued on page 6 Issue 598 / April 25th, 2023 Creating & Using Engine Files for RockSim Continued from page 5 The naming convention starts by looking at the Total Impulse in the middle of the screen, just above the thrust curve. Take that value, and use the chart below to give your rocket the first part of the Engine Code. So, for example, your motor’s total Impulse is 252 Newton-Seconds. You’d go to the chart and find what Impulse Range category it would fit into. The value of 252 N-s is greater than 160 N-s, which is the upper limit for an G motor, but less than 320 N-s, which is the upper limit for the H motor. So your new motor is in the “H” engine class. So the first part of your Engine Code will start with an “H”. The next part of the standard engine code is the Average Thrust of the motor. This is also listed in that middle section of the chart (see Figure 6). But usually, it is a long decimal number. We simply round this number off to the whole number. So if your average thrust of your motor was 123.23434, you’d round it off to 123. The basic engine code for the motor would then be H123 As stated, the engine code can really be anything you want, since you made the motor. So you might want to include some other information in it as well, such as what type of propellant you used. Aerotech and Cessaroni motors use this type of information in their own motor names, for example, the Aerotech F23FJ. The FJ on the back end stands for the “Fast Black Jack” propellant formulation. Finally, there is a drop down menu where you can select a motor type, such as single-use, reload, or hybrid. This selection is optional, and is only included in the .rse version of the engine files (not in the .eng). But RockSim uses it to help users select motors by sorting by type. Some people, when picking motors, only want to see the single-use motors because they don’t want to deal with reloading a casing. That is why this option is here. On the upper right side of the screen, there is a comments section, as shown in Figure 10. Continued on page 7 www.apogeerockets.com/Rocket-Kits/Skill-Level-2-Model-Rocket-Kits/SkyMetra Page 6 Issue 598 / April 25th, 2023 Creating & Using Engine Files for RockSim Continued from page 6 Obviously, the preferred format is the RockSim (*.rse) choice if you intend to use the engine file for RockSim specifically. RASP stands for “Rocket Altitude Simulation Program.” It was actually created by G. Harry Stine, who is known as NAR #2. That right there tells you how old that format is. The difference between RockSim engine format and the RASP format is that RASP doesn’t store as much information as the .rse file format. For example, it doesn’t save the Engine Type (single-use, reloadable, hybrid) to the file. Therefore, you won’t be able to have RockSim sort by that type of motor. Figure 10: The comments section is optional. Adding a comment to your motor file is another field that is totally optional. I know that most people don’t put anything in this section because it isn’t used at all for RockSim. But I encourage you to at least put your name in it. Take some credit for putting together the new motor file. Every time I look at a motor file, I want to see and acknowledge the person that took the time to create the motor file. I am grateful that they invested the time to make rocketry easier and more pleasurable for others (me included). At this point, the data for the motor is done. There are other tabs on the top of the screen that are optional and advanced. Unless you’re making a hybrid motor (which is a special motor that has a solid fuel, and gaseous oxidizer), you really don’t need to even click into these extra tabs. When you’re satisfied with your motor, it can be saved. Figure 11: Choose to save in the RockSim When you (*.rse) engine format. save it, you’ll notice that there are two options for the format, RASP or RockSim (see Figure 11). Page 7 If you select the RASP format, it will give you an alert and ask if you’re sure that is what you want to do, because it will have to discard some information. If you’re making engine files for simulation programs other than RockSim, this might be the option you would choose. Where you save the file is really not that important; just as long as you remember where you put it. I always tell people to just put it on the desktop so it is in a convenient location. You will need to access it in the next step. Once the file is saved, you can quit EngEdit. Now you’re ready to load it into RockSim and start using it in your simulations. Importing Your Motor File Into RockSim Start up the RockSim program, and from the File menu at the top, choose the option to Import/Engine Engine as shown in Figure 12. There will be the standard dialog box that allows you to select a file to open. You want to open the file that you previously saved from EngEdit. So you have to know where you saved it. This is why I Figure 12: To import the motor file, select File > Import > Engine Files in RockSim. Continued on page 8 Issue 598 / April 25th, 2023 Creating & Using Engine Files for RockSim Continued from page 7 said to just save it to your desktop. Once you select the file, you’ll get another dialog window that is shown in Figure 13. This is not a warning, it is a “success” dialog box. It tells you that RockSim found your new motor file, and copied it into the location where all the other motor files are located. It even gives you the path on the computer to where it stored Figure 13: This is the “success” dialog box the file. you’ll get when importing motor files. Once you have imported the file into the database, you’ll see a screen like shown in Figure 14. Figure 14 is sometimes confusing to people, so I’ll explain what this screen is used for. Basically, the column on the right side is all the motors you’ve selected to be shown RockSim. But there are so many, and sometimes a manufacturer will go out of business or you know you will not ever fly hybrid motors. So you can choose to NOT see their motors when you go to pick a motor to load in your rocket. It doesn’t delete the motor, just moves it out of the list of available motors. This shortens the list, making it easier to find the motor you want. So the ones that won’t be shown in your RockSim list are on the left column. When you import a new motor, by default, your new one will be put on the left side. That is what you see by the blue line in Figure 14. What you have to do is select your motor, and click the “Add” button in the middle column. This will move the motor over to the right side, as shown in Figure 15. It didn’t “move” your file from where you saved it. It copied it. So the file you saved from EngEdit will still be where you placed it. But at this point, the new copy of that file is in the right location that RockSim needs it. So you can delete the file you saved to the desktop if you want. This is up to you. Figure 14: The chooser window is where you can pick which motors you want to see later when selecting a motor for your simulation. Page 8 Figure 15: The new motor is now added to the list of engines that you can select. Continued on page 9 Issue 598 / April 25th, 2023 Creating & Using Engine Files for RockSim Continued from page 8 Once you’ve added the motor to the right column, as shown in Figure 15, you’ve basically finished the process of importing the motor into RockSim. Just click the OK button on the bottom, and you’re done. Now you can use the motor in your design. You’ll open a rocket design, and when you go to select a motor, you’ll find your new one in the list. This can be seen in Figure 16. About The Author: Tim Van Milligan (a.k.a. “Mr. Rocket”) is a real rocket scientist who likes helping out other rocketeers. He is an avid rocketry competitor and is Level 3 high power certified. He is often asked what is the biggest rocket he’s ever launched. His answer is that before he started writing articles and books about rocketry, he worked on the Delta II rocket that launched satellites into orbit. He has a B.S. in Aeronautical Engineering from Embry-Riddle Aeronautical University in Daytona Beach, Florida, and has worked toward an M.S. in Space Technology from the Florida Institute of Technology in Melbourne, Florida. Currently, he is the owner of Apogee Components (http://www.apogeerockets.com) and also the author of the books: Model Rocket Design and Construction, 69 Simple Science Fair Projects with Model Rockets: Aeronautics and publisher of the “Peak-of-Flight” newsletter, a FREE e-zine newsletter about model rockets. You can email him by using the contact form at https://www.apogeerockets.com/Contact. Figure 16: The new motor has been added to RockSim, and you can select it and the delays you made for it from the list. It really isn’t too hard to create a new motor using EngEdit, and importing it into RockSim is even easier. The hardest part is finding a thrust curve for the rocket motor. References: Descriptions of rocket motor propellant geometry https://www.nakka-rocketry.net/th_grain.html Example thrust curve data file that you can use to play with using EngEdit https://d11fdyfhxcs9cr.cloudfront.net/templates/170652/ myimages/f67c%20cert%20letter_1667514520973.pdf. Need Rail Buttons And Stand-Offs? www.apogeerockets.com/Building_Supplies/Launch_Lugs_Rail_Buttons/Rail_Buttons Page 9 Issue 598 / April 25th, 2023