|
[Sponsors] |
May 19, 2016, 10:07 |
Bath run with a macro (linux)
|
#1 |
New Member
Jens
Join Date: Apr 2016
Posts: 6
Rep Power: 10 |
Hello all
I need to change some values of ~200 files, which are then run in batch. I have recorded a little macro for changing these values, but how to batch-run both the simulations and the macro ? something along the line of "starccm+ -batch -np 4 -podkey key -licpath path -power MyMacro.java File(number).sim; The batch command however just runs the macro. How do i achieve loading simulation--->chaning values via macro--->running the changed simulations in a batch environment? HQjen |
|
May 19, 2016, 11:22 |
|
#2 |
Member
Join Date: Aug 2014
Location: Germany
Posts: 77
Rep Power: 12 |
start recording the macro, change your required values and start the run. Stop it after few iterations and stop recording the macro.
Your macro would now have a line like this at the end: simulation_0.getSimulationIterator().run(); Running this macro would then run your simulation after making changes in values. |
|
May 19, 2016, 11:36 |
|
#3 |
New Member
Jens
Join Date: Apr 2016
Posts: 6
Rep Power: 10 |
Thanks for the reply. Indeed, "simulation_0.getSimulationIterator().run();" is present in the macro.
However, If i specify -macro in the .sh file, it opens the gui, which is not preferable. If i specify -batch, i cant seem to open both the .sim file, and the macro. How would i get around this? |
|
May 19, 2016, 19:31 |
|
#4 |
Senior Member
Join Date: Nov 2010
Location: USA
Posts: 1,232
Rep Power: 25 |
The correct batch command is:
starccm+ -batch -np 4 -podkey key -licpath path -power -batch MyMacro.java File(number).sim the java macro is the argument of the -batch flag. |
|
May 20, 2016, 13:01 |
|
#5 |
New Member
Jens
Join Date: Apr 2016
Posts: 6
Rep Power: 10 |
That did the trick. Problem solved, thank you!
|
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Run Multiple Files in Batch | nickninevah | STAR-CCM+ | 6 | October 12, 2017 07:17 |
Help with executing macros at specific timesteps during the solution run | Codophobia | Fluent UDF and Scheme Programming | 1 | April 28, 2014 07:16 |
Parallel run of OpenFOAM in linux and windows side by side | m2montazari | OpenFOAM Running, Solving & CFD | 5 | June 24, 2011 04:26 |
Dual Boot Windows and Linux and Go Open Source | andyj | Main CFD Forum | 2 | October 21, 2010 17:49 |
Errno 24 linux | ivanwhlau | OpenFOAM Running, Solving & CFD | 6 | July 1, 2009 11:16 |