CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM Running, Solving & CFD (
-   -   Multiple consecutive runs batch/script (

Cav April 3, 2012 06:26

Multiple consecutive runs batch/script

I'm wondering if there's a way of setting up multiple OpenFOAM runs to run consecutively with one starting upon the completion of another.

I know you can write multiple commands in the terminal with && etc but this starts all the OpenFOAM runs in the command without waiting for the initial one to complete, so they all end up running at the same time.

Hope someone can help.


akidess April 3, 2012 06:51

You can write a bash script as follows:

foamSolver1 > out1.log
foamSolver2 > out2.log
foamSolver3 > out3.log

There's more sophisticated ways to do this - look at the Allrun script of the dambreak / dambreakfine tutorial.

Cav April 3, 2012 07:31

Thanks a lot Anton

All times are GMT -4. The time now is 10:34.