CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM Running, Solving & CFD (
-   -   Multi job OpenFoam (

gregjunqua May 13, 2013 19:34

Multi job OpenFoam
Hi there,
My problem is simple, I am doing the same experiment with different grid. I wanna know if there is a way to launch the different experiments one after one with one, with a script how will directly start the other job after the end of one simulation.

Thank you for your answers
Sorry i found some leads just after post the message there i will try it

Henning86 May 14, 2013 04:49

just put this skript in the folder where all the folders with the simulation are and modify it. Skripting with linux is pretty easy just use the commands you normally type in the console


for file in N400 ; do
    if [ -d "$file" ] ; then
      cd "$file";
 for file2 in TriQuad ; do
  if [ -d "$file2" ] ; then
        cd "$file2";
    echo "Starte Rechnung fuer den Ordner $file $file2"       
      mpirun -np 12 rhoCentralFoam -parallel > ${file2}Calc.log;
      reconstructPar > ${file2}reCon.log;
      Mach > ${file2}Mach.log;
    echo "$file $file2"
    cd ..;
      cd ..;

gregjunqua May 14, 2013 21:47

Hi, Thank you for your contrubution,
I use a simple script for now no time to do further for me ;)


mpirun -np 2 simpleFoam -parallel
rm -r processor*

cd ..
cd job2

All times are GMT -4. The time now is 14:03.