CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM

Stop foamJob Script

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree2Likes
  • 2 Post By wyldckat

Reply
 
LinkBack Thread Tools Display Modes
Old   December 14, 2011, 15:06
Default Stop foamJob Script
  #1
Member
 
Eric M. Tridas
Join Date: May 2011
Location: Tampa, Florida
Posts: 48
Rep Power: 6
eric.m.tridas is on a distinguished road
Hey Foamers,

I'm running a simulation using the foamJob script to give me an output file and run the process in the background. The simulation end criteria will allow it to run for an extremely long amount of time (it is a transient simulation). How does one stop the foamJob script from running the process in the background prior to reaching the end criteria?

-Eric
eric.m.tridas is offline   Reply With Quote

Old   December 14, 2011, 15:08
Default
  #2
Member
 
Eric M. Tridas
Join Date: May 2011
Location: Tampa, Florida
Posts: 48
Rep Power: 6
eric.m.tridas is on a distinguished road
This is another somewhat related question as well (but may need to be posted as its own thread) - How does one extract the initial residual of the solved variables in a transient simulation with foamLog? foamLog only seems to post the final residual.

-Eric
eric.m.tridas is offline   Reply With Quote

Old   December 15, 2011, 03:45
Default
  #3
Senior Member
 
Fabian Schlegel
Join Date: Apr 2009
Location: Dresden, Germany
Posts: 180
Rep Power: 8
fs82 is on a distinguished road
Quote:
Originally Posted by eric.m.tridas View Post
Hey Foamers,

I'm running a simulation using the foamJob script to give me an output file and run the process in the background. The simulation end criteria will allow it to run for an extremely long amount of time (it is a transient simulation). How does one stop the foamJob script from running the process in the background prior to reaching the end criteria?

-Eric
How about the various linux commands to kill a job, e.g. "kill -9 <pid>", or "killall <name>" or use "top", press k and enter the pid. If your controlDict is "runTimeModifiable" you could also change the endTime. Just try it out.

Quote:
Originally Posted by eric.m.tridas View Post
This is another somewhat related question as well (but may need to be posted as its own thread) - How does one extract the initial residual of the solved variables in a transient simulation with foamLog? foamLog only seems to post the final residual.

-Eric
As far as I know foamLog is a bash script which utilizes awk to get the specific informations. A starting point would be to use a standard editor like "kate", "nedit" or "vi" and go through the script. Copy and paste the line where "final residual" is extracted and modify it.

best regards,
Fabian
fs82 is offline   Reply With Quote

Old   December 15, 2011, 04:56
Default Some additional possibilities
  #4
Member
 
Frederic Collonval
Join Date: Apr 2009
Location: Technische Universitaet Munich - Lehrstuhl fuer Thermodynamik
Posts: 53
Rep Power: 8
fcollonv is on a distinguished road
Quote:
Originally Posted by fs82 View Post
If your controlDict is "runTimeModifiable" you could also change the endTime.
Or even more confortable change the "stopAt" to "noWriteNow", "writeNow" or "writeNext" (see User Guide - "4.3 Time and data input/output control" for more information)

Quote:
Originally Posted by fs82 View Post
As far as I know foamLog is a bash script which utilizes awk to get the specific informations. A starting point would be to use a standard editor like "kate", "nedit" or "vi" and go through the script. Copy and paste the line where "final residual" is extracted and modify it.
If you don't what to bother yourself to much, there is a great set of tools called pyFoam (http://www.openfoamwiki.net/index.php/Contrib_PyFoam). Easy to install and to use. It should bring you lots of the functions you are looking for. Have especially a look at "pyFoamPlotRunner.py"

Enjoy,

Frederic
__________________
Frederic Collonval
Technische Universität München
Thermodynamics Dpt.
fcollonv is offline   Reply With Quote

Old   December 15, 2011, 10:25
Default
  #5
Member
 
Eric M. Tridas
Join Date: May 2011
Location: Tampa, Florida
Posts: 48
Rep Power: 6
eric.m.tridas is on a distinguished road
Thanks for your replies they helped a lot!

-Eric
eric.m.tridas is offline   Reply With Quote

Old   December 15, 2011, 17:16
Default
  #6
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 8,251
Blog Entries: 34
Rep Power: 84
wyldckat is just really nicewyldckat is just really nicewyldckat is just really nicewyldckat is just really nice
Greetings to all!

Just to complete the suggestions:
Code:
foamEndJob -help
Best regards,
Bruno
iamed18 and fportela like this.
wyldckat is offline   Reply With Quote

Reply

Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Transient DPM-About Start Stop times Julie FLUENT 3 January 24, 2014 08:39
[ICEM] Script: problems with face names Maweil ANSYS Meshing & Geometry 2 October 25, 2011 21:32
how I can write the file script to submite via HPC cluster at my UNI happy CFX 2 October 17, 2011 02:18
CFX mesh script error Malik77 CFX 0 June 24, 2011 07:42
Perl script for intialisation pratik mehta CFX 2 September 10, 2008 03:09


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