CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   FLUENT (http://www.cfd-online.com/Forums/fluent/)
-   -   Pausing Fluent in batch (http://www.cfd-online.com/Forums/fluent/47413-pausing-fluent-batch.html)

Giles February 22, 2008 13:20

Pausing Fluent in batch
 
Hiya Im runnign Fluent in batch mode using a journal file, and would like to temporarily pause the process (for say 2mins ) between two commands in the journal to allow an external program to do some nifty work and create a file that Fluent needs for the next step. Im looking for somethign similar to matlab's "pause" command, or often "wait" in many codes. Any ideas?

Many thanks.

student February 22, 2008 19:48

Re: Pausing Fluent in batch
 
in journal you can run a shell command but the first character should be !

So to make fluent stop for few seconds , for example 15 sec use

!sleep(15)

or you can write your own C program and ask fluent to run it

!my_program_that_does_something

It all works


Giles February 22, 2008 22:34

Re: Pausing Fluent in batch
 
thanks for the help, ill check that plan out.

Carlos February 23, 2008 16:13

Re: Pausing Fluent in batch
 
Hi,

If you are using batch mode then you can just use a script file, which is controlled by a run file. I run batch jobs using up to 32 processors and the script just contains commands like:

rc file.cas /read case it 1500 /iterate 1500 wd file.dat /write data file

You can use this if you know when you're likely to be stopping the simulation (say every 200 iterations) and writing a corresponding file. Have a look at the fluent manual if you want to use this method.

Carlos.

Bocliff June 18, 2009 11:37

use cx-pause
 
You can pause by putting this in your journal file:

(cx-pause)

And it will wait for you to hit the return key.

If you want it to just pause for some time you can specify the time instead:

(cx-pause 5)


where the specified number is the time to wait in seconds.


Bocliff Sutter
--The powerful roar of the dragon is empty. The iridescence colors of the rainbow are only illusions.

los June 18, 2009 23:15

I had to do exactly the same once, what I did was using a loop in C to find the file that fluent should be waiting. I think it was something like this:

pb=fopen("your_file","r");

while (pb==NULL){
pb=fopen("your_file","r");
system(pause nn);
}

This way fluent checks if the file is ready at a certain nn time interval.

Hope it helps.


All times are GMT -4. The time now is 06:09.