Monte Carlo simulation.

The Rocketry Forum

Help Support The Rocketry Forum:

This site may earn a commission from merchant affiliate links, including eBay, Amazon, and others.

astroadrian99

Well-Known Member
Joined
Jun 12, 2014
Messages
78
Reaction score
0
Good morning (or good afternoon) guys, I was just wondering if somebody finally figured out how to get openrockets to have a Monte Carlo simulation (to create splash model of rocket landing). I want to be able to find area a rocket will probably land from near space but do not have the money to afford RockSim Pro or other software of that nature. I've heard of the Cambridge program as well but haven't been able to make it work properly. Other than that, I have nothing and i really need to find one of theses programs to be able to get FAA approval of the launch.

Thank you so much.
 
Are you flying through Tripoli? If so, the Class 3 committee will run it for you.
 
Are you flying through Tripoli? If so, the Class 3 committee will run it for you.

Oh no, we're flying through NAR. Is there any way we can get it from Tripoli?

a rocket will probably land from near space

Care to tell us more about this project???

That is a bit bit of a misquotation as it is going to go to near space but we want to know where it will probably land.

But to answer your question, there is not much to tell, we're attempting on getting a rocket to 60,000 ft and landing it safely. It would be using a powerful M motor to do it. There is not much else special to it other than maybe it being made of primarily carbon fiber with high temperature epoxy.
 
Your rocket is not a Class 3 rocket and doesn't require MC Splash analysis or FAA approval other than a normal class 2 FAA waiver.

Its described in. FAR 101.29.
 
Under TRA that would be a C-3 rocket - anything over 50k AGL or greater than O-Impulse needs to go though the C-3 committee.
But I suspect John is right, under NAR you're good to go provided you have the waiver.

BTW: 60k AGL is nowhere near space... you are only about 1/6th of the way there.
 
Last edited:
Under TRA that would be a C-3 rocket - anything over 50k AGL or greater than O-Impulse needs to go though the C-3 committee.
But I suspect John is right, under NAR you're good to go provided you have the waiver.

BTW: 60k AGL is nowhere near space... you are only about 1/6th of the way there.

I am going by FAR 101. It appears as written FAA only requires range analysis for a rocket with P motor impulse or higher. For less than that FAA only cares about up not down. I do not see anything in FAR where altitude makes a difference, oddly.
 
So back to OP's question, has anyone figured out how to get OpenRocket to successfully do a Monte Carlo simulation? Google seems to point to a requirement for external python scripts but I'm unsure if that's still current. Basically I'd love to see a "how to" for putting together a proper Monte Carlo simulation if someone has one.
 
Hello, first post here. I am a recently retired guy, currently in process of scratch building my first new rocket in over 30 years. Launched several kit rockets in the early 70's, and a few more in early-80's while earning a degree in college. My goal is to attempt Tripoli Level 1 certification by the end of the this year.

Anyway, I used OpenRocket to design and tune a few things. I also wanted the Monte Carlo "splashdown" analysis. First, I am a bit familiar with Octave, the open source corollary of MatLab. I used it in performing some flight dynamics analysis for a project last year, when I was building an aircraft simulation. That project also made extensive use of the SU2 CFD software running on a dedicated Linux machine (I only mention that, as it may figure into future rocketry analysis projects as well.)

So, I tried using the latest Cambridge Rocket Simulator program, and could never get the FlightPlotter part to work properly. I think it was triggering a virus pattern alert, and it got quarantined. However, I was still able to export a .csv file of tabulated data so not a complete loss.

I then went to the Cambridge Rocketry Toolbox, and started with that. Very sparse "how-to" documentation for that, but luckily Octave has extensive documentation. Found I had to manually load a differential equation solver package into Octave before any of the routines would run. Here is a screen shot of the Monte Carlo done on Cambridge Rocketry Toolbox on Octave 4.0.2. It took about 5 minutes to run on a Windows 7 i7 machine. I'll probably upgrade to a newer version of Octave soon, as release notes say it now has even greater compatibility with MatLab .m scripts.

This seems to work, if you wish to use all open-source free software.
MonteCTutorial.jpg
 
So back to OP's question, has anyone figured out how to get OpenRocket to successfully do a Monte Carlo simulation?

Yeah. Change a parameter. Press "Launch." Write down the result. Repeat 50,000 times.

Until OR develops a simulator function call that runs in batch and can be coded in a loop, any splashdown, ANOVA, or optimization study will be impractical.
 
Yeah. Change a parameter. Press "Launch." Write down the result. Repeat 50,000 times.

Geesh, that sounds like a perfect coder's purgatory. No scripts allowed....

I like the post just above. Octave and Matlab are great packages for scripting in automation. Just need the right data to feed them.
 
Hello, first post here. I am a recently retired guy, currently in process of scratch building my first new rocket in over 30 years. Launched several kit rockets in the early 70's, and a few more in early-80's while earning a degree in college. My goal is to attempt Tripoli Level 1 certification by the end of the this year.

Anyway, I used OpenRocket to design and tune a few things. I also wanted the Monte Carlo "splashdown" analysis. First, I am a bit familiar with Octave, the open source corollary of MatLab. I used it in performing some flight dynamics analysis for a project last year, when I was building an aircraft simulation. That project also made extensive use of the SU2 CFD software running on a dedicated Linux machine (I only mention that, as it may figure into future rocketry analysis projects as well.)

So, I tried using the latest Cambridge Rocket Simulator program, and could never get the FlightPlotter part to work properly. I think it was triggering a virus pattern alert, and it got quarantined. However, I was still able to export a .csv file of tabulated data so not a complete loss.

I then went to the Cambridge Rocketry Toolbox, and started with that. Very sparse "how-to" documentation for that, but luckily Octave has extensive documentation. Found I had to manually load a differential equation solver package into Octave before any of the routines would run. Here is a screen shot of the Monte Carlo done on Cambridge Rocketry Toolbox on Octave 4.0.2. It took about 5 minutes to run on a Windows 7 i7 machine. I'll probably upgrade to a newer version of Octave soon, as release notes say it now has even greater compatibility with MatLab .m scripts.

This seems to work, if you wish to use all open-source free software.
View attachment 315872

I have attempted that one, but I find it annoying as it does not allow me to write my own atmospheric information (ones reported by NOAA). Every time I spend a couple of ours putting it all in, it then gives me an error telling me something is wrong, but won't tell me what.
 
OK, I have not yet tried to input NOAA data or otherwise into the definition array of TemplateF214.m

I'll give this a go, and see what happens. If I get any good results, I will be sure to post back in this thread.
 
OK, I have not yet tried to input NOAA data or otherwise into the definition array of TemplateF214.m

I'll give this a go, and see what happens. If I get any good results, I will be sure to post back in this thread.

Sounds good.
 
OK, I took todays NOAA data from BNA (Nashville, TN), and substituted into the array of TemplateF214.m

When I ran the script, I renamed the output file TemplateBNA032817.m. I got a warning that the template function name, did not match the file name, but it went ahead and created an intab4_BNA032817.mat file.

Then I changed the atmosphere file in just the test script Template1ST.m to that file. I renamed that file, TemplateFBNA.m and ran that. Again, I got just a warning that function and filename did not match, but it ran anyway. I will attach screenshot of that single test result. I am fairly confident by substituting into the Monte Carlo file, that atmosphere .mat file, it should run OK too. But I will test it as well, to make sure.

The trajectory result from the single launch test script, is quite different from the original tutorial template, so it appears that the new atmosphere data is being used. A lot of trouble I know, but really it only took about 15 minutes for me to change the data in the template array, and then run this test.

BNASingleTest.jpg
 
By the way, here is a section of the BNA atmosphere template script that I modified to reflect the conditions at Nashville a while ago. I did not change the number of rows in the array (7), as I did not want to take too big a step there in the changes.

BNA Template.jpg
 
OK, here is the result of the Monte Carlo on 5 iterations, for todays Nashville NOAA data inputs. I expanded the splash plot and average trajectory plots. The main warnings I got this time, were that the differential equation solvers were not reaching total convergence after 10,000 iterations each test. Took quite a while longer to compute this because of that, but still the results are there.

When I finally get my rocket ready for the Level 1 attempt, I hope to be able to run this on-site to see just how accurate the prediction model is. I would not be surprised if the reality is substantially different than the computer model.

I have no idea at this time, if this is sufficient for a Level 3 analysis submission. Given my current retirement budget, I doubt if that will be a future goal. But software-wise, this is zero dollars invested at this point.
MonteC BNA.jpg
 
That's excellent work ecarson! Any chance you'd be willing to write a bit of a how-to for accomplishing this on either Windows or Linux?
 
That's excellent work ecarson! Any chance you'd be willing to write a bit of a how-to for accomplishing this on either Windows or Linux?

I would love this too, as I have no idea how you manged to get that to work. I have been trying all day with no success whatsoever.
 
Thank you for the praise. Let me fine tune this a bit more, as it has some rough edges. I would be happy
to detail the myriad steps I took, but it will take a bit of time. If I write a procedure, it has to work in the
field for myself using a laptop, as this was the actual intended use.
 
Thank you for the praise. Let me fine tune this a bit more, as it has some rough edges. I would be happy
to detail the myriad steps I took, but it will take a bit of time. If I write a procedure, it has to work in the
field for myself using a laptop, as this was the actual intended use.

Sounds good ecarson. FYI I'm willing to do some shakedown/beta testing if necessary. My season opens in roughly 4 weeks time. I'm also willing to help with editing and readability to allow you to focus on the technical side of the simulation if that would be beneficial.
 
I've never heard of an M motor hitting 60K'

I agree .... something's not right here ....
TRA record is a tad over 45k.
What's the REAL scoop on this project?
 
I've never heard of an M motor hitting 60K'

I agree .... something's not right here ....
TRA record is a tad over 45k.
What's the REAL scoop on this project?

Is the TRA record 45k? Looking at the records page it seems that the single stage M record has "Yet to be claimed".

https://www.tripoli.org/Records/Commercial-M-Records

That said I do believe roughly 45k is near the top of what a 75mm full M can do. Nic Lottering holds the AMRS single stage M record here in Australia. He flew a M2245 to 45,554 ft AGL. Details are here.

https://forum.ausrocketry.com/viewtopic.php?f=73&t=5466&sid=75bffeebba078f42366794190b600f66

Edit: added "AGL"
 
Is the TRA record 45k? Looking at the records page it seems that the single stage M record has "Yet to be claimed".

The TRA records page lists Nic's flight on the M2245 just as you noted....

That link you posted is empty. Check here: https://tripoli-records.org/records/

As I recall, the records committee is working with David Wilkins to get the Tripoli.org site updated.


Steve Shannon
 
Back
Top