OpenRocket: a new Open Source Rocket Simulator

Discussions about rockets, construction materials, adhesives, nozzles, nosecones and fin design.
User avatar
U.S. Water Rockets1
WRA2 Member
WRA2 Member
Posts: 1778
Joined: Sat Feb 03, 2007 3:24 pm

OpenRocket: a new Open Source Rocket Simulator

Post by U.S. Water Rockets1 »

We recently discovered a neat new rocket simulation program that a group of programmers have put together called OpenRocket. The project is an open source program that anyone can contribute to. The program is pretty new and is already quite fully featured and looks to be very well done. The program currently supports pyro rockets in the simulation mode, but they have on their list of future features the addition of support for water rockets. Even without specific support for water rocket simulation built-in, the rocket designer and calculator is something that even water rocket designers could make use of. It accurately reproduced the CP and CG for X-12 right out of the box. It even allowed us to test how X-12 would perform if it used pyro motors instead of water/air power.

Check out the project at http://openrocket.sourceforge.net

If you're an aspiring programmer, feel free to join the project and help us add the necessary extensions for water rockets.
Team U.S. Water Rockets
Visit USWaterRockets.com
Visit our Blog
Tune in to our YouTube Channel
Visit our Facebook page
Visit our Twitter Page
Opportunity is missed by most people because it is dressed in overalls and looks like work. --Thomas Edison
User avatar
pudresful
WRA2 Member
WRA2 Member
Posts: 41
Joined: Sat Sep 04, 2010 9:57 am

Re: OpenRocket: a new Open Source Rocket Simulator

Post by pudresful »

thanks!!! thats what I have been looking for!!! RAT: TH: WO:
User avatar
Spaceman Spiff
WRA2 Member
WRA2 Member
Posts: 681
Joined: Sat Feb 24, 2007 11:06 am

Re: OpenRocket: a new Open Source Rocket Simulator

Post by Spaceman Spiff »

Awesome discovery, you guys!

I just downloaded it, and it's really professional looking. It even does a pretty reasonable calculation of the weight of the rocket (I used PVC for the bottle material).


Thanks for sharing this!!!!
Spaceman Spiff
"What goes up, must come down"
User avatar
U.S. Water Rockets1
WRA2 Member
WRA2 Member
Posts: 1778
Joined: Sat Feb 03, 2007 3:24 pm

Re: OpenRocket: a new Open Source Rocket Simulator

Post by U.S. Water Rockets1 »

pudresful wrote:thanks!!! thats what I have been looking for!!! RAT: TH: WO:
Glad to help you out!

Enjoy!
Team U.S. Water Rockets
Visit USWaterRockets.com
Visit our Blog
Tune in to our YouTube Channel
Visit our Facebook page
Visit our Twitter Page
Opportunity is missed by most people because it is dressed in overalls and looks like work. --Thomas Edison
User avatar
The Sky Dart
WRA2 Member
WRA2 Member
Posts: 83
Joined: Mon Jun 15, 2009 10:44 am

Re: OpenRocket: a new Open Source Rocket Simulator

Post by The Sky Dart »

There is one way to simulate a water rocket without waiting for any further development. It is possible to add your own trust curves to the list of motors.
To do so you have to open the .jar file through WinZip or something similar. Then go to datafilesthrustcurves folder. There you'll see files representing motors available in OR. There are two different types .eng and .rsp. For some motors there may be a couple of different files in different format. Both can be viewed in a text editor. .eng format is easier to work with and I usually use it if I want a custom made thrust curve. Elsewhere on http://www.thrustcurve.org/motorstats.shtml there is a description of both formats, but basically it's just a list of time-thrust values with some additional information in the first row, such as a motor weight, delay etc. Alternately I suggest you just compare what OR shows and context of the corresponding file. A new, for example .eng file can be just dragged and dropped back into .jar file. Let me know if more instructions are needed.

Now, the main question is how to calculate the thrust curve you want to model. Some time ago I used this simulator
http://www.et.byu.edu/~wheeler/benchtop/sim.php and reverse calculated thrust from acceleration curves. I suppose there may be other more accurate ways to obtain the required data.

I do encourage people to use OR. There are many aspects that, if taken care of, can significantly improve performance.
Cheers,
The Sky Dart
______________________________________
http://sites.google.com/site/theskydartteam/
User avatar
Spaceman Spiff
WRA2 Member
WRA2 Member
Posts: 681
Joined: Sat Feb 24, 2007 11:06 am

Re: OpenRocket: a new Open Source Rocket Simulator

Post by Spaceman Spiff »

The Sky Dart wrote:There is one way to simulate a water rocket without waiting for any further development. It is possible to add your own trust curves to the list of motors.
To do so you have to open the .jar file through WinZip or something similar. Then go to datafilesthrustcurves folder. There you'll see files representing motors available in OR. There are two different types .eng and .rsp. For some motors there may be a couple of different files in different format. Both can be viewed in a text editor. .eng format is easier to work with and I usually use it if I want a custom made thrust curve. Elsewhere on http://www.thrustcurve.org/motorstats.shtml there is a description of both formats, but basically it's just a list of time-thrust values with some additional information in the first row, such as a motor weight, delay etc. Alternately I suggest you just compare what OR shows and context of the corresponding file. A new, for example .eng file can be just dragged and dropped back into .jar file. Let me know if more instructions are needed.

Now, the main question is how to calculate the thrust curve you want to model. Some time ago I used this simulator
http://www.et.byu.edu/~wheeler/benchtop/sim.php and reverse calculated thrust from acceleration curves. I suppose there may be other more accurate ways to obtain the required data.

I do encourage people to use OR. There are many aspects that, if taken care of, can significantly improve performance.
Thanks for the instructions. You seem to have a good handle on the program, so I was wondering if you could answer a question for me. Since the program simulates pyro motors, is there a way to program it to simulate the weight of the water and how it goes away as the rocket thrusts?
Spaceman Spiff
"What goes up, must come down"
User avatar
The Sky Dart
WRA2 Member
WRA2 Member
Posts: 83
Joined: Mon Jun 15, 2009 10:44 am

Re: OpenRocket: a new Open Source Rocket Simulator

Post by The Sky Dart »

Spaceman Spiff wrote: Thanks for the instructions. You seem to have a good handle on the program, so I was wondering if you could answer a question for me. Since the program simulates pyro motors, is there a way to program it to simulate the weight of the water and how it goes away as the rocket thrusts?
First of all here are more accurate links explaining details about thrust curve files: http://www.thrustcurve.org/raspformat.shtml. And another one for a little tool helping with the thrust file creation: http://www.thrustcurve.org/tctracer.shtml

Go to File and Open an example.... Open the one called "a simple model rocket". One of the motor configuration used called C6-5. Now look at the attached Fig1. It shows the C6-5 motor thrust curve. On the right hand side there are Launch mass and Empty mass of the motor. The difference between the two is the mass of the propellent. The program doesn't care what propellent is used. The thrust of a motor is directly proportional to the velocity of the escaping gas and the mass per time unit that is exhausted.Thus, knowing the thrust curve and the propellent mass, it calculates a proportion of the mass exhauster at a particular time. Information about to masses is in the header of a thrust curve file. I think, but I'm not sure at the moment, that in the .rse motor file, information about propellent mass is explicitly stated. However, I don't think OR uses it. As far as I remember another tool, commercially available RockSim, may use it.

Now, go to Flight Simulation, select Simulation 4, corresponding to C6-6 motor, and run it. Then select Plot/Export button above. In Y axis type select Mass in on of the drop down menus. and plot it. You'll see something similar to the attached Fig2. To exaggerate the effect I've deliberately changed mass of some parts to 0. As you can see the between the motor ignition and its burnout the rocket mass changes by about 11g, which is the difference between the Launch mass and the Empty mass of the motor in Fig1. Also note that in the beginning the mass change is not linear thanks to the initial spike in its thrust curve.

As I said above I can't see why OR can't be use to model a water rocket providing one knows the rocket thrust curve. Obtaining such data is the most difficult part.
Attachments
Fig2.jpg
Fig2.jpg (119.53 KiB) Viewed 94 times
Fig1.jpg
Fig1.jpg (210.23 KiB) Viewed 94 times
Cheers,
The Sky Dart
______________________________________
http://sites.google.com/site/theskydartteam/
User avatar
U.S. Water Rockets1
WRA2 Member
WRA2 Member
Posts: 1778
Joined: Sat Feb 03, 2007 3:24 pm

Re: OpenRocket: a new Open Source Rocket Simulator

Post by U.S. Water Rockets1 »

Sky Dart,

Thanks for the very informative information. That will definitely come in handy. We really appreciate your taking the time to post this tutorial here.
Team U.S. Water Rockets
Visit USWaterRockets.com
Visit our Blog
Tune in to our YouTube Channel
Visit our Facebook page
Visit our Twitter Page
Opportunity is missed by most people because it is dressed in overalls and looks like work. --Thomas Edison
User avatar
The Sky Dart
WRA2 Member
WRA2 Member
Posts: 83
Joined: Mon Jun 15, 2009 10:44 am

Re: OpenRocket: a new Open Source Rocket Simulator

Post by The Sky Dart »

This kind of data will be sufficient to model it in OR.
Cheers,
The Sky Dart
______________________________________
http://sites.google.com/site/theskydartteam/
User avatar
The Sky Dart
WRA2 Member
WRA2 Member
Posts: 83
Joined: Mon Jun 15, 2009 10:44 am

Re: OpenRocket: a new Open Source Rocket Simulator

Post by The Sky Dart »

Here is an example of how it could be done.

I used the ThrustCurve Motor Tracer tool (can be downloaded from http://www.thrustcurve.org/tctracer.shtml) to trace Test #4 thrust curve from the Air Command site . The attached zip is the .eng file created by the tracer tool. I didn't know dimensions of the bottle and its dry mass, so I speculated and set 150mm diameter, 450 mm length and 100g dry mass. But these parameters can be easel corrected in the .eng file header:

;
ACWR-800L 150 450 P 0.8 0.9 AirCommand
0.012 31.078
0.021 44.954

Here 150 is the motor dia, 450 - its length, 800 - propellent mass which in our case is water, 900 - loaded mass, or mass of water + the bottle mass.

Load the .eng file into the OR as I described previously and it'll be available in the tool as on the attached picture.

The second attached zip file is an example of a rocket based on the described motor. Note an important aspect. As mass of the bottle is included in the motor characteristic, weight of the body tube housing the motor should be set to 0. Also a transition with 0 mass is added at the bottom to simulate the bottle shape.
Attachments
WaterRocketExample.zip
(1.85 KiB) Downloaded 436 times
Motor.jpg
Motor.jpg (122.84 KiB) Viewed 74 times
AirCommand_ACWR-800L.zip
(674 Bytes) Downloaded 397 times
Cheers,
The Sky Dart
______________________________________
http://sites.google.com/site/theskydartteam/
User avatar
Spaceman Spiff
WRA2 Member
WRA2 Member
Posts: 681
Joined: Sat Feb 24, 2007 11:06 am

Re: OpenRocket: a new Open Source Rocket Simulator

Post by Spaceman Spiff »

The Sky Dart wrote:Here is an example of how it could be done.

I used the ThrustCurve Motor Tracer tool (can be downloaded from http://www.thrustcurve.org/tctracer.shtml) to trace Test #4 thrust curve from the Air Command site. The attached zip is the .eng file created by the tracer tool. I didn't know dimensions of the bottle and its dry mass, so I speculated and set 150mm diameter, 450 mm length and 100g dry mass. But these parameters can be easel corrected in the .eng file header:

;
ACWR-800L 150 450 P 0.8 0.9 AirCommand
0.012 31.078
0.021 44.954

Here 150 is the motor dia, 450 - its length, 800 - propellent mass which in our case is water, 900 - loaded mass, or mass of water + the bottle mass.

Load the .eng file into the OR as I described previously and it'll be available in the tool as on the attached picture.

The second attached zip file is an example of a rocket based on the described motor. Note an important aspect. As mass of the bottle is included in the motor characteristic, weight of the body tube housing the motor should be set to 0. Also a transition with 0 mass is added at the bottom to simulate the bottle shape.

If I am following you correctly, you are using that thrust curve software to create a new engine for the openrocket program based on measurements that George took? This sounds like a nice way to create a super accurate simulator by applying real empirical data. Very good work. Thanks for the effort and explaining it.
Spaceman Spiff
"What goes up, must come down"
air.command
Senior Member
Senior Member
Posts: 183
Joined: Wed Jul 09, 2008 5:20 am

Re: OpenRocket: a new Open Source Rocket Simulator

Post by air.command »

The Sky Dart wrote:Here is an example of how it could be done.

I used the ThrustCurve Motor Tracer tool (can be downloaded from http://www.thrustcurve.org/tctracer.shtml) to trace Test #4 thrust curve from the Air Command site. The attached zip is the .eng file created by the tracer tool. I didn't know dimensions of the bottle and its dry mass, so I speculated and set 150mm diameter, 450 mm length and 100g dry mass. But these parameters can be easel corrected in the .eng file header:

;
ACWR-800L 150 450 P 0.8 0.9 AirCommand
0.012 31.078
0.021 44.954
Very nice work with the tracer tool. That was always the intention that the captured thrust curves can be used with tools such as these. One of the drawbacks for water rockets is that you have such a continuum of different parameters such as pressure chamber volume, nozzle size and amount of water that the thrust curves will be quite different for each combination. You would have to try to create a range of thrust curves that cover the common combinations, but would not necessarily accurately represent any one particular rocket you are simulating. One of the reasons it works well for pyro rockets is that motors come in nice discrete performance packages, though there may be several hundred of them.

Where I think the tracer tool would particularly be very interesting to use is to compare performance of water only rockets with foam rockets. Foam rockets cannot currently be simmed in a meaningful way with regular water rocket simulators. So far we have mostly been relying on actual flight testing to compare the two. Here are some thrust curves that could be used for that comparison using the tracer tool.


- George
http://www.AirCommandRockets.com
User avatar
The Sky Dart
WRA2 Member
WRA2 Member
Posts: 83
Joined: Mon Jun 15, 2009 10:44 am

Re: OpenRocket: a new Open Source Rocket Simulator

Post by The Sky Dart »

Spaceman Spiff wrote: If I am following you correctly, you are using that thrust curve software to create a new engine for the openrocket program based on measurements that George took?
Absolutely correct.
Cheers,
The Sky Dart
______________________________________
http://sites.google.com/site/theskydartteam/
User avatar
The Sky Dart
WRA2 Member
WRA2 Member
Posts: 83
Joined: Mon Jun 15, 2009 10:44 am

Re: OpenRocket: a new Open Source Rocket Simulator

Post by The Sky Dart »

air.command wrote: Very nice work with the tracer tool. That was always the intention that the captured thrust curves can be used with tools such as these. One of the drawbacks for water rockets is that you have such a continuum of different parameters such as pressure chamber volume, nozzle size and amount of water that the thrust curves will be quite different for each combination. You would have to try to create a range of thrust curves that cover the common combinations, but would not necessarily accurately represent any one particular rocket you are simulating. One of the reasons it works well for pyro rockets is that motors come in nice discrete performance packages, though there may be several hundred of them.

Where I think the tracer tool would particularly be very interesting to use is to compare performance of water only rockets with foam rockets. Foam rockets cannot currently be simmed in a meaningful way with regular water rocket simulators. So far we have mostly been relying on actual flight testing to compare the two. Here are some thrust curves that could be used for that comparison using the tracer tool.


- George
The tracer tool is a minor supplementary program. I used it only because the original data were not available. Otherwise the motor file can be created using for example Excel. Mine main focus is on OpenRocket simulator.

Indeed, a new file has to be created to reflect any changes altering a motor thrust, such as nozzle size, volume of water etc. But it is exactly the same for conventional rocket motors. That is why there are, as you've pointed out, hundreds of different motors and therefore that many motor files used in simulation.
However, having said that, I see two aspects that indeed complicate everything. One is the size of the water motor. Due to the energy density of a propellent used in conventional rocket motors they have relatively small linear dimensions. As the result of this burning the propellent does not significantly change CG of the motor relative to CGs of other elements of the rocket, or if it changes, it usually moves fore.
The water motor is different in this respect. Depending upon the motor/rocket design there maybe a significant displacement of CG aft. In relatively simple tools like OR such effect is not simulate.

Secondly, use of L-tube will significantly change the motor thrust. This should be reflected in the thrust curve, although it may not be possible to measure the L-tube phase experimentally. Perhaps, thanks to relatively simple physics, a practical way is to calculate L-tube phase and add to the experimental data.
Cheers,
The Sky Dart
______________________________________
http://sites.google.com/site/theskydartteam/
User avatar
Team Seneca
WRA2 Member
WRA2 Member
Posts: 242
Joined: Sun Dec 31, 2006 1:40 am

Re: OpenRocket: a new Open Source Rocket Simulator

Post by Team Seneca »

This is an interesting discussion, but it would not be wise to base any simulators off of these limited test results. There are many factors which this testing does not take into account and this will need to be addressed by any simulator software. A few factors which need to be considered:
  • 1. The PET bottles found in various regions are not identical. They vary in shape and volume as well as mass and wall thickness. All of these differences would cause variations in the amount of thrust any one bottle can generate.

    2. This test uses water pressure to stretch the bottle to measure the thrust. This is not an ideal reproduction of what happens in a water rocket launch. The Coefficient of Linear Thermal Expansion of PET plastic is not taken into account by this test setup, because the setup does not replicate the heating of the PET bottle during a water rocket pressurization phase or the cooling it experiences during the thrust phase. The difference is that the thermal mass and conductivity of the 100% fill of water is vastly different than what a bottle experiences when pressurized by air. The water is virtually incompressible (at the pressures we use) and so it does not heat up like the air does when pressurized. The water also is in contact with the entire bottle and draws off the heat generated by the stretching bottle. This changes the amount of expansion the bottle undergoes naturally as it is pressurized, compared to the typical 33% water fill of a water rocket.

    3. Also not considered is the Flexural Modulus of Elasticity of the PET, which is also affected by temperature. In the case of this test, the temperature is basically fixed to the temperature of the water inside the bottle. It is not known what that temperature is, so the amount of elasticity of the plastic could be very different than what a typical water rocket would experience with air as the pressurization and the heat caused by stretching.
To simulate the thrust imparted on a water rocket by the bottle, it would be most accurate to model the actual bottles (shape, thickness, etc) and would certinly have to include the ambient temperature, the water temperature, and the fill rate (because it would change the amount of heat dissipated over time).

Having results like the above would be very valuable in testing the output of the bottle thrust simulation math, but it would be a mistake to base a thrust simulation on a narrow experimental result. A sample of one data point does not make for a good result.
Bill W.
Team Seneca