Model Rocketry

Reference / Paper · 2004

Peak of Flight #130: Optimizing Your Design Using SMARTSim

Read the PDF ↗

Apogee Components' Peak of Flight newsletter, issue 130 (2004).

Author
Tim Van Milligan / Apogee Components
Year
2004
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 #130: Optimizing Your Design Using SMARTSim

Apogee Components' Peak of Flight newsletter, issue 130 (2004).

I S S U E N E W 1 3 0 , S A U G L E 2 3 , T T 2 0 0 4 E R Feature Article How To Optimize Your Next Rocket Design Using SMARTSim 1130 Elkton Drive, Suite A Colorado Springs, Colorado 80907 USA www.ApogeeRockets.com email: [email protected] phone: 719-535-9335 fax: 719-534-9050 Page 1 ISSUE 130 - AUG 23, 2004 P E A K O F F L I G H T Fundamentals of SMARTSim Software By Kenneth J. Karbon SMARTSim is a complementary software to RockSim that provides additional functionality to your rocket simulations. It performs “goal seeking” and optimization between two design or simulation parameters. The software is geared to modelers who want to fully understand and tweak the performance of their rockets. High power, competition, and Team America Challenge rocketeers will find SMARTSim useful when precision and confidence are critical to their designs. This article gives an overview of the SMARTSim basics and works through some typical applications. History I met Tim Van Milligan at NARAM 40 in Muncie, Indiana where I presented an R&D paper on numerical methods. Tim was interested in my Runge-Kutta computer code and wanted to implement it in RockSim. In exchange, I got a copy of RockSim 4 to play with. I was hooked. Since that time, I served as a beta tester and communicated with the programmer, Paul Fossey, on various simulation techniques. I liked the optimal mass feature in RockSim, but I wanted to fine-tune other variables too, like Cd and launch angle. If I could only “hook” into RockSim, then I could make an application to do this. The breakthrough came when Paul converted to the XML file format and created a solver executable that runs in the background. This allowed other programmers like myself to tie into RockSim and write addon software. The result is a utility to enhance your use of RockSim. SMARTSim is “smart” because it will zero-in or optimize any value using efficient numerical algorithms. You don’t have to repeatedly guess and re-check your answer in RockSim to get the result you want. Application: Backtracking Drag Coefficient Let’s say you designed a model from scratch with elaborate side pods, fins on fins, or ring tails and simulated it in RockSim version 7 to 1373 ft as shown in Figure 1. Next, you build a prototype and install an altimeter, Figure 1: RockSim Calculation making sure to match the weight and other conditions with the simulation. The altimeter reports only 1000 ft. Why the difference? Experienced rocketeers will advise you to check the drag coefficient. The Cd calculator in RockSim works pretty well for classic rocket shapes, but uncertainty lies with the drag estimation of the extra pods and non-typical fins. Here are some methods of getting a better Cd: a. Test the model in a wind tunnel b. Perform Computational Fluid Dynamics (CFD) c. Use a recording altimeter to figure out acceleration and drag curves over time d. Re-run RockSim with new values of Cd until you match 1000 ft. Options A and B are probably beyond the means of most hobbyists. Option C is the rigorous “backtracking” method but requires the right kind of altimeter, software, and detailed input. Option D is a simplified, yet practical approach, using a fixed drag coefficient that summarizes the flight. This “tuned” drag coefficient will make future simulations more accurate. This is where SMARTSim comes in. Instead of you guessing Cd and checking the result, SMARTSim will interface with RockSim and do it automatically. I’ll use this application to work through the basic methodology of SMARTSim. First, some pre-work is required in RockSim. Run a new simulation with “Calculate Cd at simulation time” unchecked in the Rocket design attributes tab and use the default number for “Constant Cd 1” as in Figure 2. This sets up a fixed drag coefficient simulation for SMARTSim to use. SMARTSim reads the information stored in the design file, so you have to save the file with the correct settings, flight events, Continued on Page 3 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 ISSUE 130 - AUG 23, 2004 P E A K O F F L I G H T SMARTSim Fundamentals Continued From Page 2 weather, etc. for your simulation. SMARTSim also uses your customized RockSim application settings (like units) so there is no confusion between software. Figure 2. Disabled RockSim Cd Calculator When you launch SMARTSim, you will see a small, plain window. This is helpful when you are running both RockSim and SMARTSim on your computer, which is a wise thing to do as you create, optimize, and verify simulations. There are no fancy graphics or buttons. SMARTSim is a utility software, so I think it should look like one. The power is behind the scenes. Yes, I know it looks boring, but I am a numbers guy! From the file menu, open the RockSim design file. You now have access to every design and simulation parameter in the model to select as inputs and responses! To make searching easier, there are some pre-defined “Scenarios” in the top menu, like “Fixed Cd - Max Altitude” shown in Figure 3. Selecting this will find the correct data in the design file and load it into SMARTSim. Enter 1000 ft as the desired response. The scenarios also give suggested values for the starting “guesses” and convergence criteria (Figure 4). The guesses are needed to kick off the calculations and the convergence criteria determine the precision of the final solution. Figure 3. SMARTSim Scenarios A P O G E E Figure 4: SMARTSim Main Window That’s all you have to do. The setup is pretty simple. Now press “Calculate”. A status window opens to show the progression of the iterations (Figure 5). Each iteration runs RockSim in the background and recalculates the simulation based on automatic updates of Cd as input. The numerical algorithm in SMARTSim hones in on the answer. An input of Cd = 0.719 gives the desired response of 1000 ft maximum altitude in just 3 try’s. The final solution and end value are written back to the main panel. You can’t manually guess and check this accurately or efficiently! Continued on Page 4 Figure 5: SMARTSim Status Window. R O C K E T S Page 3 ISSUE 130 - AUG 23, 2004 P E A K O F SMARTSim Fundamentals Continued From Page 3 Verify this result by plugging it back into RockSim and recalculating the simulation as given in Figure 6. Bingo. The max altitude is 1000 ft. F L I G H T the “Maximize” radio button for the response variable. Figure 7 shows a typical solution progression. More iterations are used, because finding the true “peak” requires a bit more precision. The solution says angle the rod about 15( away from the wind and gain 90 ft (Figure 8). This small detail can make the difference in competition. Figure 8: Launch Angle Benefit Confirmed In RockSim Figure 6: Solution Verified in RockSim Build Your Own “Scenarios” Application: Optimizing Launch Angle The beauty of SMARTSim is that it is general purpose. You can select any two parameters from the rkt file to study for optimization or goal seeking. To do this, click on “Browse...” to search the RockSim file for inputs or responses. This opens up the file in a “tree view” using the parent-child hierarchy of the XML format as shown in Figure 9. The previous example was a goal seeking or “root finding” problem. We wanted to know X that produces Y. With launch rod angle, there is an optimum angle that maximizes altitude when wind is present. Again, setup a candidate simulation in RockSim that includes the wind conditions. SMARTSim has a built in scenario for this one, called “Launch Angle - Max Altitude”. Instead of “Desired”, use Figure 9: Tree View of RockSim Design File. The “RockSimDocument” consists of two major sections: “DesignInformation” and “SimulationResultsList. ” The first section contains all the rocket parts and overall design characteristics. Typically for a single-stage design, the individual parts will be under “Stage3Parts” (Figure 10). The second section consists of the individual simulation details saved in the file. The simulation results contain all the computed results like altitude and velocity, as well as weather and launch conditions. It takes a little time to navigate and understand how the file structure works, but the variable names are fairly self-explanatory. The SMARTSim Help menu includes a document describing all the XML file elements. You can even edit the rocket design file with a word processor and Continued on Page 5 Figure 7: Launch Angle Convergence A P O G E E Page 4 R O C K E T S ISSUE 130 - AUG 23, 2004 P E A K O F SMARTSim Fundamentals Continued From Page 4 F L I G H T LaunchGuideLen LaunchTemperature IgnitionDelay EjectionDelay SemiSpan Responses Figure 10: Location of Rocket Parts in the Tree then open the modified file in RockSim. When you find the parameters of interest from the tree, SMARTSim passes the names and current values back to the main panel. After your SMARTSim study, you can save all the input information as a new scenario with a name you provide. You can then recall the scenario at a later time (even with a different rkt file) and avoid searching the tree all over again. Of course, it is up to you to select meaningful and reasonable parameters that are within the bounds of the simulation. For example, you should not demand 10 miles as desired maximum altitude from an Estes Alpha with a B motor! Here are some variables off the top of my head that can be found in the RockSim file and saved in a scenario for creative optimization and goal seeking: MaxAcceleration VelocityAtDeployment AltitudeAtDeployment TimeToLanding (Note: Duration is rumored to be the 2005 TARC objective.) VelocityAtLaunchGuideEnd CG0 BarrowmanXN Summary This article gives an introduction to the SMARTSim utility software and describes how to fine-tune RockSim designs. More information can be found on the SMARTSim product web page (www.ApogeeRockets.com/smartsim. asp). A future article will detail some of the theory behind the software and provide tips for advanced usage. Inputs MassObject and KnownMass n Versio o m e D ! FREE oad It NOW l n w Do RockSim Makes Designing Rockets Easy, Accurate, and Affordable • Easiest Software to Learn, and Fastest To Use. • Create Templates and Patterns to Build Your Rockets. • Generates The Most Accurate Simulation Results. • Saves You Money By Preventing Design Errors and Launch Mistakes. • Used By More Rocketeers - Because It Is So Reliable. • "The Best Value For Your Money!" Compare Features! Bargain Price of Just: $95 A P O G E E Visit the Apogee web site for more information: www.ApogeeRockets.com/rocksim.asp R O C K E T S Page 5