Quantcast

Automating OpenRocket Simulations

The Rocketry Forum

Help Support The Rocketry Forum:

Nick Z

New Member
Joined
Feb 26, 2020
Messages
1
Reaction score
0
Hi all,

I am trying to find a way to automate OpenRocket to run many simulations sequentially, changing some variables between iterations.

I.e. Start with a rocket setup, then run 500 simulations increasing the outside temperature 0.05 degC each iteration.

Some ideas were interfacing with java or batch/powershell/linux scripting. Any solid way to do this?

Thanks!
 

wolsen

Well-Known Member
TRF Supporter
Joined
Apr 14, 2019
Messages
80
Reaction score
100
In theory, writing code to interact with OpenRocket is doable (and has even been done). OpenRocket is written in Java so you should be able to write a Java program which interfaces and interacts with the OpenRocket core libraries. In fact, the swing interface (UI) is simply a visual presentation and interaction layer on top of the core libraries so you can use this as your guide with how to interact with the core libraries.

If you're interested in other languages (such as python), there appears to be the capabilities for that as well - however there appear to be some issues down this path, so YMMV.
 

Buckeye

Well-Known Member
TRF Supporter
Joined
Sep 6, 2009
Messages
2,510
Reaction score
359
Hi all,

I am trying to find a way to automate OpenRocket to run many simulations sequentially, changing some variables between iterations.

I.e. Start with a rocket setup, then run 500 simulations increasing the outside temperature 0.05 degC each iteration.

Some ideas were interfacing with java or batch/powershell/linux scripting. Any solid way to do this?

Thanks!
Here is the best and easy way.

Suck it up and buy RockSim. It comes with a batch executable that you can call from any code you care to write. It takes the .rkt file as an argument. So, manipulate the .rkt file and run the batch code in a loop to iterate through your parameters. Easy Peasy. I did this almost 20 years ago with code I wrote in VB6! It was flexible enough that I could iterate on any parameter in the .rkt file. No need to worry about RS's source code. It is just a black box to your wrapper code.

Successful user-applications that hack into OR java jibberish code are few and far between. For what you want to do, the commercial product is a better choice.
 
Top