CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > Siemens > STAR-CCM+

Bath run with a macro (linux)

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 1 Post By harry123
  • 1 Post By me3840

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 19, 2016, 10:07
Default Bath run with a macro (linux)
  #1
New Member
 
Jens
Join Date: Apr 2016
Posts: 6
Rep Power: 10
Hqjen is on a distinguished road
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
Hqjen is offline   Reply With Quote

Old   May 19, 2016, 11:22
Default
  #2
Member
 
Join Date: Aug 2014
Location: Germany
Posts: 80
Rep Power: 12
harry123 is on a distinguished road
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.
Hqjen likes this.
harry123 is offline   Reply With Quote

Old   May 19, 2016, 11:36
Default
  #3
New Member
 
Jens
Join Date: Apr 2016
Posts: 6
Rep Power: 10
Hqjen is on a distinguished road
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?
Hqjen is offline   Reply With Quote

Old   May 19, 2016, 19:31
Default
  #4
Senior Member
 
Join Date: Nov 2010
Location: USA
Posts: 1,232
Rep Power: 25
me3840 is on a distinguished road
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.
Hqjen likes this.
me3840 is offline   Reply With Quote

Old   May 20, 2016, 13:01
Default
  #5
New Member
 
Jens
Join Date: Apr 2016
Posts: 6
Rep Power: 10
Hqjen is on a distinguished road
That did the trick. Problem solved, thank you!
Hqjen is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


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


All times are GMT -4. The time now is 01:42.