Peak of Flight #35: Speeding up your RockSim Simulations
Apogee Components' Peak of Flight newsletter, issue 35. Date: undated; published between 2000 and 2005 (from the neighbouring dated issues).
I S S U E
N
E
W
S
L
E
3 5
T
T
E
R
Speeding Up Your RockSim Simulations
By Tim Van Milligan
In the short history of RockSim v5.0, I've heard a lot of
people say that this version is much slower than v4.0.
The reason it seems slower is RockSim v5 is actually calculating a lot more parameters during the launch. You can see
all the different parameters (and compare them to version 4),
by going to the plot menu.
The speed is further reduced because version 5 now also
calculates the descent of the rocket after the recovery device
is deployed. Since the descent is nearly always longer than
the ascent, it takes more time to calculate the entire flight of
the rocket.
Because of all these parameters, the speed of the simulations is reduced. But the benefit is that you have more data to
examine, which makes RockSim v5 even more powerful.
Besides going out and buying a new, faster computer, what
can you do to increase the speed of the simulations?
Here are the things that I recommend:
Not every simulation you perform needs to be maximum
accuracy. You can make some subtle changes that reduce ac-
curacy slightly to increase simulation speed significantly. If
you then need maximum accuracy, you can switch back to the
prior defaults.
First: When going to load a motor, click on the "Simulation Controls" tab. Select "End the simulation when the rocket
reaches apogee." This turns off the descent calculations (after
the recovery device is deployed) This makes RockSim v5 run
just like the old version 4. This will dramatically speed up the
calculations for the entire flight.
Second: If you click on the Application Settings button,
you can increase the speed by changing the "simulation resolution" under the "Simulation" tab. The default of RockSim
v5 is 1000 samples per second. What this means is that
RockSim is calculating each of the parameters 1000 times
during each second the rocket is traveling upward. Since there
are 60 parameters, there are a minimum of 60,000 calculations performed for each second prior to the recovery device
being deployed. On a long burn motor (like the Apogee F10
with an 8 second burn time), RockSim must do at least 480,000
calculations. And some parameters require other calculations,
so the number of mathematical calculations actually performed
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
In the application settings, turn down the
sample rate. This will greatly improve the
speed of your simulations.
is incredible. All these make RockSim a powerful simulation
program, but they also slow down the simulations.
Take a look at the size of the Temp files RockSim creates
for each simulation. Some of them can be huge: 40 or more
megabytes. That is a huge amount of data, and gives you an
indication of what RockSim is doing during the time it is
"thinking."
The "samples per second" number can be reduced with
only a little bit of loss in accuracy. For flights with no wind,
you can turn it down to 100 samples per second. The lower
limit to this number is the motor's burn time and shape of the
thrust curve. You don't want to set the number lower than the
time distance between points on the thrust curve (which you
can view in EngEdit that comes bundled with RockSim). For
example, if points on the thrust curve are very close together,
such as 0.02 seconds apart, then a sample rate of 50 could
possibly miss those points on the thrust curve.
This can become more critical with motors that have extremely short thrust durations and very abrupt changes in the
shape of the curve (ie.; lots of spikes on the curve). In that
case, turn "up" the number of samples per second.
If there is "wind" in the simulation, don't go below 300
samples per second. This time the reason is that the rocket
oscillates during ascent, and if the resolution is too low, the
software may not accurately calculate the orientation of the
F
L
I
G
H
T
rocket during quick oscillations.
Three: The descent rate resolution can also be turned way
down. During descent, the model will always fall at a constant speed; except for the very brief time period when the
parachute just opens. If you don't care about the little bit of
inaccuracy just after deployment, you can turn the number all
the way down to 1 sample per each second. I personally keep
mine at 5 samples per second.
Four: Also in Application Settings, select the ExplicitEuler method over the Fourth Order Runge-Kutta method. This
is about four times faster at any sample resolution. And the
loss in accuracy is probably going to be less than a couple of
feet on a typical rocket flight. I hope to post an R&D report to
the Apogee Educational Guide that explains the difference
between these two methods later.
Where you will notice a significant time lag is during optimum mass calculations. Make sure to use the speedier methods listed above. But you should try to bracket the optimum
mass as much as possible during the set-up.
Start by choosing a reasonable starting point. For example,
if you are flying a 12 pound rocket, it doesn't make a lot of
sense to start the simulation at an initial mass of 1 gram. Start
it at something much higher, say 9 pounds. Choosing the stopping point is equally important; but is harder to predict up
front. But in the previous example, it doesn't make sense to
stop the simulation at 100 pounds.
Also, use a mass step size as big as possible. In the example listed here, try a 28 gram (1 oz) step size on a big rockets -- instead of 1 gram. After the first "quick" run through,
you can perform a second optimum mass that has been further
bracketed. Example, if the first run through says the optimum
mass in near 15 pounds, you can start the second simulation at
14 pounds, and stop it at 16 pounds. You can further increase
the accuracy by reducing the step size.
As stated before, because of the "samples per second"
you can easily predict that the longer the flight, the longer it
will take RockSim to calculate the simulation. So long burn
motors and multi-stage rockets will take longer to complete
the simulation calculations.
Other areas that seems slower are the plot screen and the
2-D flight profile. The reason they are slower is that RockSim
must perform additional calculations to display the data. With
so many data points generated per flight, RockSim has to de-
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
P
E
A
K
O
F
cide which data points to display on the screen, and which
ones to ignore. Displaying all the points would take much
longer, and wouldn't add any additional value to the displays.
Also, because the sample rates are different -- before and
after parachute deployment -- RockSim also has to make some
interpolations after the deployment point to fill in some of the
missing data for display on the screen.
To try to explain this, the lines you see on the plot (and
the flight profile) are data points that are very close together.
If it is displaying 100 data points/sec prior to deployment, then
it also has to display 100 data points/sec after deployment. In
the Flight Profile, if the numbers aren't the same, the rocket
will "appear" like it falls significantly faster than it flies upward. So to continue the example, if the sample rate after deployment is only 10 calculation/second, then RockSim has to
determine 90 other points during that time period.
In conclusion, RockSim v5 does take a little longer to
perform simulations than v4. But the reason is that it is performing significantly more calculations to try to give you more
F
L
I
G
H
T
data to make informed decisions about your launch. This makes
v5 much better.
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.
RockSim: Software That Lets You
Design Amazing Rockets!
RockSim is the leading software for designing rockets, and finding out
how high they'll fly. With it, you can:
Yes!
It is Easy
To Use.
Design Any Size Rocket.
Use Any Size Motor.
Create Assymetric Fin
Arrangements.
Print Fin & Ring Templates.
Find The Best Size
Parachute Or Streamer.
Predict Altitude, Speed.
Simulate Electronic
Staging Events.
Simulate Dual-Deployment.
Determine Close-ProximityRecovery Launch Angle.
e Alive!
cket Visions Com
Your Ro
RockSim Makes
FREE
ion.
Demo Vers
Download
it today.
Just $95!
It costs a little more, but
it can save you Hundreds.
A P O G E E
Mix Motor Sizes In Cluster
Configurations.
Display 2D Layouts And
Rotating-3D Images.
View Annimations Of The
Launch And Recovery.
Predict Cd and CP.
Supports Up To 3 Stages
Including Strap-on's.
Graph Out The Results.
Export Results To Any
Spreadsheet Program.
Huge Parts Database.
Use It To Teach Others
About Rocketry.
Hold a Virtual Contest
Against Your Friends.
Apogee Components, Inc.
1130 Elkton Drive, Suite A
Colorado Springs, Colorado 80907-8501 USA
Tel: (719) 535-9335 Fax: (719) 534-9050
Web Site: www.ApogeeRockets.com/RockSim.asp
R O C K E T S
Page
3