Quantcast

Monte Carlo simulation.

The Rocketry Forum

Help Support The Rocketry Forum:

astroadrian99

Well-Known Member
Joined
Jun 13, 2014
Messages
72
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.
 

markkoelsch

Well-Known Member
Joined
Mar 18, 2009
Messages
4,364
Reaction score
148
Are you flying through Tripoli? If so, the Class 3 committee will run it for you.
 

FredA

Well-Known Member
Joined
Jan 19, 2009
Messages
2,170
Reaction score
347
a rocket will probably land from near space

Care to tell us more about this project???
 

astroadrian99

Well-Known Member
Joined
Jun 13, 2014
Messages
72
Reaction score
0
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.
 

jderimig

Sponsor
TRF Sponsor
Joined
Jan 23, 2009
Messages
3,294
Reaction score
711
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.
 

FredA

Well-Known Member
Joined
Jan 19, 2009
Messages
2,170
Reaction score
347
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:

jderimig

Sponsor
TRF Sponsor
Joined
Jan 23, 2009
Messages
3,294
Reaction score
711
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.
 

plugger

Well-Known Member
Joined
May 1, 2009
Messages
483
Reaction score
175
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.
 

ecarson

Well-Known Member
Joined
Mar 21, 2017
Messages
105
Reaction score
10
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
 

Buckeye

Well-Known Member
TRF Supporter
Joined
Sep 6, 2009
Messages
2,611
Reaction score
463
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.
 

Nytrunner

Pop lugs, not drugs
TRF Supporter
Joined
Oct 15, 2016
Messages
7,751
Reaction score
3,377
Location
Huntsville AL
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.
 

astroadrian99

Well-Known Member
Joined
Jun 13, 2014
Messages
72
Reaction score
0
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.
 

ecarson

Well-Known Member
Joined
Mar 21, 2017
Messages
105
Reaction score
10
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.
 

astroadrian99

Well-Known Member
Joined
Jun 13, 2014
Messages
72
Reaction score
0
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.
 

ecarson

Well-Known Member
Joined
Mar 21, 2017
Messages
105
Reaction score
10
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
 

ecarson

Well-Known Member
Joined
Mar 21, 2017
Messages
105
Reaction score
10
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
 

ecarson

Well-Known Member
Joined
Mar 21, 2017
Messages
105
Reaction score
10
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
 

plugger

Well-Known Member
Joined
May 1, 2009
Messages
483
Reaction score
175
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?
 

astroadrian99

Well-Known Member
Joined
Jun 13, 2014
Messages
72
Reaction score
0
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.
 

ecarson

Well-Known Member
Joined
Mar 21, 2017
Messages
105
Reaction score
10
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.
 

plugger

Well-Known Member
Joined
May 1, 2009
Messages
483
Reaction score
175
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.
 

FredA

Well-Known Member
Joined
Jan 19, 2009
Messages
2,170
Reaction score
347
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?
 

plugger

Well-Known Member
Joined
May 1, 2009
Messages
483
Reaction score
175
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".

http://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.

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

Edit: added "AGL"
 

OverTheTop

Well-Known Member
TRF Supporter
Joined
Jul 10, 2007
Messages
4,835
Reaction score
2,076
Location
Melbourne Australia
Yeah. Change a parameter. Press "Launch." Write down the result. Repeat 50,000 times.
Been there, done that, but not that many times.

For reasonable stats you need a minimum of about 30 data points. Confidence with a sample of 5 is a bit scratchy.
 

FredA

Well-Known Member
Joined
Jan 19, 2009
Messages
2,170
Reaction score
347
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: http://tripoli-records.org/records/
 

Steve Shannon

Well-Known Member
TRF Supporter
Joined
Jul 23, 2011
Messages
6,582
Reaction score
3,374
Location
Butte, Montana
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: http://tripoli-records.org/records/
As I recall, the records committee is working with David Wilkins to get the Tripoli.org site updated.


Steve Shannon
 
Top