CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   STAR-CCM+ (https://www.cfd-online.com/Forums/star-ccm/)
-   -   Running simulations sequentially using batch file (https://www.cfd-online.com/Forums/star-ccm/208110-running-simulations-sequentially-using-batch-file.html)

Lazarus October 9, 2018 10:00

Running simulations sequentially using batch file
 
Hi,

I have several simulations to be run by Star-CCM+. I'd like to perform the subsequent simulation automatically after the previous one has finished.

May I ask how can i do that in a batch file?

I have created the batch file as the following, but this time all cases run simultaneously. However, as i said, I'd like to run these .sim files sequentially.

@echo off
start /d "C:\.." starccm+.exe -load -np 8 "C:\..\first_case.sim" -batch "C:\..\run.java"
start /d "C:\.." starccm+.exe -load -np 8 "C:\..\second_case.sim" -batch "C:\..\run.java"
start /d "C:\.." starccm+.exe -load -np 8 "C:\..\third_case.sim" -batch "C:\..\run.java"
pause

Thanks in advance.

bluebase October 9, 2018 10:59

Hi Lazarus,

don't use the startprogram to run starccm (unless explicitely wanted).
Instead, call starccm+.exe directly.
You probably should do a quick websearch to find out more about batch syntax and the program start.

Moreover, you might want to redirect the output to some file.

Best regards,
Sebastian

Code:

@echo off
"C:\..\starccm+.exe" -load -np 8 "C:\..\first_case.sim" -batch "C:\..\run.java" > first_case.sim.log 2>&1
"C:\..\starccm+.exe" -load -np 8 "C:\..\second_case.sim" -batch "C:\..\run.java" > second_case.sim.log 2>&1
"C:\..\starccm+.exe" -load -np 8 "C:\..\third_case.sim" -batch "C:\..\run.java" > third_case.sim.log 2>&1
pause


Maddin October 19, 2018 15:15

I use the run.java file.


All times are GMT -4. The time now is 04:59.