CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

Multiple consecutive runs batch/script

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 3, 2012, 07:26
Default Multiple consecutive runs batch/script
  #1
Cav
New Member
 
Join Date: Aug 2009
Posts: 3
Rep Power: 17
Cav is on a distinguished road
Hello,

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.

Thanks.
Cav is offline   Reply With Quote

Old   April 3, 2012, 07:51
Default
  #2
Senior Member
 
akidess's Avatar
 
Anton Kidess
Join Date: May 2009
Location: Germany
Posts: 1,377
Rep Power: 30
akidess will become famous soon enough
You can write a bash script as follows:
Code:
#!/bin/bash
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.
__________________
*On twitter @akidTwit
*Spend as much time formulating your questions as you expect people to spend on their answer.
akidess is offline   Reply With Quote

Old   April 3, 2012, 08:31
Default
  #3
Cav
New Member
 
Join Date: Aug 2009
Posts: 3
Rep Power: 17
Cav is on a distinguished road
Thanks a lot Anton
Cav 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
how to set periodic boundary conditions Ganesh FLUENT 15 November 18, 2020 07:09
best practice: how to manage multiple runs? mirko OpenFOAM Running, Solving & CFD 2 May 3, 2011 11:48
OpenFOAM static build on Cray XT5 asaijo OpenFOAM Installation 9 April 6, 2011 13:21
setting up multiple runs mapuma FLUENT 1 February 12, 2010 02:28
Automating multiple runs within pre? Zheng CFX 7 February 3, 2005 16:33


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