Model Rocketry

Reference / Paper · 2006

Peak of Flight #168: Using SMARTSim 2.0's Batch Processing Feature Part 1

Read the PDF ↗

Apogee Components' Peak of Flight newsletter, issue 168 (2006-10-05).

Author
Tim Van Milligan / Apogee Components
Year
2006
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 #168: Using SMARTSim 2.0's Batch Processing Feature Part 1

Apogee Components' Peak of Flight newsletter, issue 168 (2006-10-05).

I S S U E 1 6 8 - O C T O B E R 5 , 2 0 0 6 SMARTSim 2.0 is Here! INSIDE: • Batch Processing with SMARTSim 2.0 • Shock Cord Tip • Web Site of the Week • Apogee's Rocket Grant Program 1130 Elkton Drive, Suite A Colorado Springs, Colorado 80907 USA www.ApogeeRockets.com e-mail: [email protected] phone: 719-535-9335 fax: 719-534-9050 I S S U E 1 6 8 - O C T O B E R 5, 2 0 0 6 Batch Processing with SMARTSim 2.0 Perform thousands of simulations while you sleep Written by Kenneth J. Karbon SMARTSim is complementary software to RockSim that solves and optimizes simulation parameters. SMARTSim manages an interface to RockSim and does a lot of grunt work behind the scenes with efficient numerical algorithms. For previous discussion of SMARTSim basics, tips, and examples, see the past Apogee newsletters: http://www.apogeerockets.com/education/downloads/ Newsletter130.pdf http://www.apogeerockets.com/education/downloads/ Newsletter134.pdf This article focuses on a new utility in SMARTSim v2.0 that generates many RockSim simulations in batch mode. In computer terms, “batch” means to perform a group of operations without user interaction, usually with a text file of commands. Rather than repeatedly using the RockSim GUI to adjust parameters, run the sims and retrieve the results, SMARTSim can do it for you automatically. This saves time and prevents mistakes when you need to run dozens or even thousands of simulations. RockSim is a great design tool, and SMARTSim makes it even better. The batch functionality is geared to rocketeers who want to fully understand all the “what-ifs” in their rocket designs. High power, competition, and Team America Rocketry Challenge (TARC) modelers will find it useful when efficiency, precision, and confidence are critical to their work. How is Batch Processing Different from Regular SMARTSim? The primary SMARTSim code solves and optimizes pairs of variables. Batch calculations can change many variables and provide reams of data for further analy- sis. Unlike regular SMARTSim which needs continuous variables (Cd, mass, length, etc.), batch can also accept discrete quantity values, like engines and RockSim “shape codes” for fins and nose cones. The batch utility is perfect to set up all the needed runs in a Design of Experiments (DOE). It can also be used to simulate your list of favorite motors or typical weather conditions at your launch site and save them to the design file. The entire RockSim file is available for study, so the possibilities are endless. To use batch SMARTSim effectively, users need to have a good understanding of RockSim, the “rkt” design file conventions, and computer spreadsheets. Batch processing is a 3-step method in SMARTSim v2.0: 1. Create a batch file in SMARTSim. 2. Fill in a run “matrix” with combinations of parameters at the end of the file. 3. Return to SMARTSim and execute the completed batch file. The process will be explained in more detail as we work through some examples that illustrate the wide range of applications that SMARTSim offers. Example 1 - Fin Study This simple, step-by-step example will demonstrate how to use the SMARTSim batch utility. Our goal is to determine the effects of fin number (3 or 4), shape (elliptical or trapezoidal), and span (1 inch or 2 inch) on maximum altitude for a given rocket design. The three fin parameters will be evaluated at 2 levels each for a full factorial of 8 combinations (Remember that 23 = 8). These 8 combinations are just one way of defining the “design space” for study. There are many different tools and methods to set up experiments and analyze designs. DOE is a field of engineering all to itself and beyond the scope of this article. First, I prepared a RockSim design as usual and created at least one simulation with the desired flight events and weather conditions. Open this file in SMARTSim. From the top menu, choose Tools>Create Batch File. This opens a new form with a tree view browser of the rocket file as in Figure 1. Navigate to the part Fin Set in the tree (The search function is handy here). Select Fin Count, Shape Code, and Semi-span and “Add” them as “Control Factors.” These are the three fin parameters whose values we “control” in our study. Next, find Max continued on page 4 About this Newsletter You can subscribe “FREE” to receive this e-zine at the Apogee Components web site (www.ApogeeRockets.com), or by sending an e-mail 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 I S S U E 1 6 8 - O C T O B E R 5, 2 0 0 6 Apogee Rocketry Grant Program Apogee Components, Inc. is pleased to announce the first in a yearly grant program geared toward model rocketry education organizations! The rules are simple: 1. Entrants must submit an essay to Apogee. There is no length requirement for the essay. 2. Any club, organization, school program, etc. is eligible for entry. This would include rocketry clubs or prefectures, 4H, scouts, etc. 3. The content and purpose of the essay is as follows: • If we gave you $300.00, How would you use it to impact the rocketry community? • How many people you think it will reach? • How many people are involved in the organizing and running of the event? • How big of an effect will it have on the rocketry community? 4. One of the biggest things to keep in mind when composing your essay is, “How is what I am planning unique”? There will be only one winner and recipient of the grant, which is $300.00 toward any order with Apogee Components. The deadline for entry is November 30, 2006. The grant winner will be announced on January 1,2007. What a great way to start off the new year! Remember that “The First Step into Space is an Apogee Model Rocket”! ® A P O G E E R O C K E T S Page 3 I S S U E 1 6 8 - O C T O B E R 5, 2 0 0 6 Altitude in the first Simulation Results (number 0) and add it as an “Output Factor.” “Write” the batch file. Open the batch file (comma-delimited csv format) in a spreadsheet like Excel (Figure 2). Any text processor will also work, but spreadsheet functions make it easy to copy, paste, and fill the run matrix. The Figure 1. Selecting first 5 lines contain info to Batch Parameters help SMARTSim perform for the Fin Study the batch process. Lines 6 thru 8 indicate the control and output factors, your preferred units, and their names in the RockSim design file. Do not modify lines 1-8. Starting with line 9, I filled in the values for the 8 combinations of fin parameters. Each row represents a new simulation to run in batch with SMARTSim automatically updating the values of the factors. Note that Shape Code = 0 refers to trapezoidal and Shape Code = 1 refers to elliptical. (Go to Help > Figure 2. Fin Study Batch RockSim File XML File in a Spreadsheet Elements for definitions.) Do not put anything in the Max Altitude output column because SMARTSim will retrieve this data for us at the end of each sim. Save the csv file and close. Filling the run matrix is performed outside of SMARTSim to allow for the most flexibility. The user can apply any DOE method he chooses. Entering repeated run combinations with a spreadsheet is far easier than typing values into some sort of GUI or text editor. Note that the first 8 lines in the file are unique to this particular RockSim design file and must be re-created for different rkt files, simulations, or factors. However, the run matrix starting in line 9 can be re-used and pasted into other batch files. This feature will be evident in the next example. Go to Tools > Run Batch Simulations (Figure 3). Browse for the batch file that was just created and edited. Select the output options. New simulations can be appended to a RockSim file or output values written back to the batch text file. For this example, check the box to “Add results to output columns of batch file.” Click Run. A status window will appear detailing the Figure 3. Batch progress of the 8 new simuRun Form lations. When complete, open the batch file again as in Figure 4. The results for Max Altitude for each run are added to the appropriate column. The second combination (3 fins, trapezoidal, 1 inch span) gives the highest altitude (2533 ft) in the simulation. This simple example illustrates the process for much larger problems. Instead of 3 variables, say you had 6, each at 3 levels. That’s a full factorial of 729 (36) combinations. It would take Figure 4. Batch File you days to perform with Output Results the study by manually adjusting the parameters and pressing the “launch” button in the RockSim GUI. Only with batch processing can you attempt such a large number of simulations. The need for a spreadsheet is also obvious when setting up and analyzing a batch file of this magnitude. To further test the robustness of the software, I submitted a batch file with six factors and 10,000 simulations! The job ran for several hours overnight, but no memory or overflow errors occurred. Example 2 – Create a List of Engine Simulations Appended to a RockSim File I use the same group of 29mm and 38mm motors in all my HPR rockets. For each new RockSim design file that I create, I want to simulate the same set of motors (about 20 of them). This requires selecting the engine and delay combinations over and over again 20 times in the RockSim GUI. I don’t like this kind of donkey work, so this application in particular inspired me to develop the batch processor in SMARTSim. The next example runs simulations for every 18mm continued on page 5 A P O G E E Page 4 R O C K E T S I S S U E 1 6 8 - O C T O B E R 5, 2 0 0 6 engine in the RockSim database and appends them to a RockSim file. The list of engines can be saved and used in batch for new design files created in the future. Also, if you receive a rkt file from another modeler (through the EMRR database for example), you can readily append your favorite motor combinations to it. Open a rkt file in SMARTSim and launch the Batch Create form (Figure 5). The motor types are found in the Engine Figure 5. Batch CreSet of the Simulation ate Form with Engine Results. To fully speciControl Factors fy a motor, Engine Mfg, Engine Code, and Engine Delay must be selected as control factors. I also added Simulation Name as a con- trol factor because this element describes the loaded engines in the RockSim GUI display. No output factors are needed in the batch file because we are going to append the new simulations to a RockSim design file. Open the batch file in a spreadsheet and add lines for each motor specification as shown in Figure 6. Names for the manufacturer and engine code must follow the RockSim database format. A total of 16 motors of 18mm diameter are in my database, representing Figure 6. Adding Engine Aerotech, Estes, and Control Factor ValQuest. Use an Engine ues to the Batch File Delay of –1, as this indicates to RockSim to calculate “all” delays. Simulation Name is how RockSim displays the loaded engine. I ba- RockSim: The Software That Lets You Design Amazing Rockets! RockSim is the leading software for designing rockets, and finding out how high they will fly. Here is what rocketeers are saying about it: “After a lot of searching on the Net, Rocksim is the best rocketry simulation software I have seen. In terms of sophistication, ‘Rocksim’ is to ‘VCP’ as ‘VCP’ is to ‘cutting out pieces of cardboard’.” -- Brian Crosse Launch Success Begins with RockSim Dream It Design It n Simulate It n Build It n Fly It. n n Space Foundation certified as an excellent teaching aid. A P O G E E www.RockSim.com For further information, call Apogee Components at: 719-535-9335. Mention this ad for a free CD-ROM of RockSim how-to videos. R O C K E T S Page 5 I S S U E 1 6 8 - O C T O B E R 5, 2 0 0 6 continued from page 5 sically followed this format, but you can use any descriptive text in this field. Go to Tools > Run Batch Simulations (Refer to Fig- Figure 7. Appended Simulaure 3). Select tions (1 to 16) in RockSim “Append simulations to RockSim file” as the output option and give a file name. Be careful when appending many simulations as this creates very big rkt files. Press Run. When complete, read the appended rkt file into RockSim and see the 16 new simulations (Figure 7). Save the batch file in a handy location and paste the motor combinations into batch files for new designs. A similar application would be to define weather/ starting conditions that are “typical” of your launch site. Control factors could be engine, wind, and launch angle, with output factors of optimal delay and landing range. From the batch output file, make lookup tables and graphs that you can use in the field. Summary Consider the famous quote of mathematician and computer scientist Richard Hamming (1915-1998): “The purpose of computing is insight, not numbers.” Batch processing captures the essence of this motto very nicely. SMARTSim crunches the numbers while you focus on your rocket design. If you want to fully explore all the “what-ifs” or just want to save time with your RockSim simulations, then you need SMARTSim. In a Part 2 of this article, I will show how batch simulations with SMARTSim along with powerful data processing can help you win the TARC 2007 competition. About the Author Ken Karbon is a rocketeer from Michigan and the developer of SMARTSim. He holds a Masters Degree in Mechanical Engineering and works as an aerodynamicist in the auto industry, specializing in CFD simulation. For more information email [email protected] www.ApogeeRockets.com/october_special.asp A P O G E E Page 6 R O C K E T S I S S U E 1 6 8 - O C T O B E R 5, 2 0 0 6 TIP OF THE FIN Many commercial kits come with an elastic shock cord. As is said very often, “The only place elastic belongs is in your underwear”. It is highly recommended to replace the elastic shock cord with tubular nylon or tubular Kevlar. A rule of thumb is to use 3 times the the length of the rocket. All of our Apogee and Dynastar kits come standard with Kevlar®. Kevlar® is fire-proof, stronger than steel, and is used to make bullet-proof vests. Your shock cords will easily last the life of the rocket. Our cords are braided and uncoated of waxes or sealers (so you can glue it). You can find this product at http://www. apogeerockets.com/construction_supplies. asp#shock_cord. A P O G E E QUESTION AND ANSWER CORNER Davin Lim asks, "I’ve run into an odd situation regarding how Rocksim computes drag on nose cones. As I reduce the length of a 2.5” diameter elliptical nose cone from 5 inches to 2.5 inches, the calculated drag goes down (and corresponding altitude prediction goes up). I’m guessing I’m entering a region where the drag equations break down (or maybe this is just a bug?). Do you happen to know at what point (e.g. length v. diameter) that the drag computations aren’t reliable anymore"? The DATCOM equations that RockSim uses for the nose cone drag are based on the wetted surface area of the part. The smaller the part, the lower the drag. You’ll also find cone shape has less drag than others because cones have smaller surface areas. It is not perfect to real-world conditions, but it will get you in the ballpark for most rockets. - Tim van Milligan (a.k.a. - "Mr. Rocket") R O C K E T S Page 7 I S S U E 1 6 8 - O C T O B E R 5, 2 0 0 6 Astounding Achievements in Rocketry Name Accomplishment Bob Haas Level 3 Gary Neal Level 2 Lee Walker Level 1 Brad Shea Level 1 Tim Spry Level 2 Joe Lacina Level 2 Mike Payne Level 2 Bob Dixon Level 1 Chris Frazier Level 2 Ken Plattner Level 2 Ken Reilly Level 2 Steve Frazier Level 2 Stephen DeShong Level 1 Bobby Wright Level 1 & 2 J C Worhen Level 1 & 2 Ken Hogren Level 2 Kurt Savegnago Level 2 Paul Kent Level 2 Kelsey Young Level 1 July - Craig Nelson Level 2 Lawrence Southwick, Jr. Level 2 Steve Hedland Level 3 Rollin Bateman Level 1 Chris Hyers Level 2 David Lucas Level 2 Steve Gerber Level 3 David Tietz Level 2 Greg Cornett Level 2 Thomas P. Secrist Level 2 Ted Hipple Level 1 Patrick Chiles Level 1 Larry B. Rice Level 1 Robert Krausert Level 1 Tom Aument Level 2 Bob Moreash Level 3 Buzz Hempel Level 2 Rick Hill Level 2 Alan R. Buettner Level 1 State AL AR AR SC SC SC CO CO CO CO CO CO FL CA ID IL IL MA MN MN NV NV NY MO MO OH OH OH OH OH OH OH OR PA TX TX VA WA Jim Jarvis, Level 3 to approximately 35,000 feet and mach 2.8 plus. . I think that the most extreme cert flight prior to this one was the L3 of Dan Stroud at LDRS 21. Not only did Jim have the most extreme cert flight on record, he also set the altitude record for N motors (not updated yet on the TRA website). Jim is a proud resident of Austin, Texas and a member in good standing with the Austin Area Rocketry Group. Correction: Please note In newsletter # 166, Layne Sunderlin was listed as certifying Level 2. He only certified to Level 1. If you have a rocketry related accomplishment, whether it is with a club, 4H, school, please email me at [email protected] so we can recognize your achievement! DEFINING MOMENTS Decalage is a downward angle-of-attack of the tailfins (compared to the angle-of-attack of the main wings) on a glider. The purpose of decalage is to allow a glider to pull out of a dive. Featured Certifier Jim Jarvis achieved his L3 certification in grand style at LDRS 25. On the Saturday of the launch, in the morning high altitude window he successfully completed the most extreme certification flight in history. Flying his completely hand built rocket, all carbon fiber laid up by his own hand, he flew an Animal Motor Works N4000 A P O G E E Page 8 Decalage on Tail. R O C K E T S I S S U E 1 6 8 - O C T O B E R 5, 2 0 0 6 Page 1 of 1 If you want to build REALLY big rockets try these two great books from Apogee Space Books www.apogeebooks.com 905 637 5737 "Apogee Books" is not affiliated with Apogee Components. But they do sell some nifty space books, and we do recommend them. The website for this issue is for all you high power certifying enthusiasts! “RocketDreemz” is found at http://www.rocketdreemz.com/rocket_dreemz_001. htm. It is owned by Jim Ballard and is a great site to learn about certifying at all three levels. Most of the emphasis is on his Level 3 project, but information on the beginning of his certification journey is also posted. In 2003 Jim says, “I discovered there were much bigger and more powerful facets of the hobby that I had no idea existed. I began surfing the net and was amazed at what I found. Well, needless to say... I WAS HOOKED! Just ask my wife...” Jim’s L-1 flight was on an H128 that took his rocket to about 1200 feet. Next came time for a Level 2 project. For A P O G E E this, he chose a 4” diameter missile in which he delved into dual-deployment. After passing his Level 2 written test, Jim slapped a CTI J330 in and the rocket hit 3661 feet. The main thrust of the site, of course, is Jim’s Level 3 project which got him his certification at LDRS ‘06! With an 8” diameter beast and all scratch-built, Jim really shows off his skills as a modeler as he takes you through many pages of details on the construction of this rocket. He put the 60 pound monster up on an M1550 to certify. Also helpful is a page that Jim dedicates to “tools of the trade”, which goes through the devices he uses to create his designs. This is a great site to peruse when preparing for your own certifications. Jim’s details will get your creative juices flowing and help you think through a lot of the details that are involved with certifying high power at any level! R O C K E T S Page 9