CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   FLUENT (http://www.cfd-online.com/Forums/fluent/)
-   -   Save images using Fluent in batch processing mode (http://www.cfd-online.com/Forums/fluent/106768-save-images-using-fluent-batch-processing-mode.html)

dixitked September 7, 2012 12:18

Save images using Fluent in batch processing mode
 
Hi,
I want to run the Fluent in batch processing mode and save images at each iteration.
I have a script which works in TUI mode, but when I use it in batch mode it gives an error:
Error: No graphics functions are available.
Error Object: ()
/display/contour water vof 0 1

Does anybody know how to save images when the Fluent is used in batch mode ?

NormalVector September 7, 2012 13:58

Here's the way that I do it:

Create a journal file that includes everything you do in a normal interactive session of Fluent (including setting up the solution animation) up until the point of running the solution. Inside of the journal file, manually add a line that opens the case and data before the graphics manipulation part of the journal. Then add lines at the end of the journal to iterate, write the case and data, and exit Fluent.

Then, in your batch script, prompt to open up the graphical version and tell it to run the journal file you created. I can post an example journal and batch script if needed but the commands may be specific to the way I have batch setup.

dixitked September 9, 2012 21:16

Thanks NormalVector, it worked.

Is it possible to solve the case in the batch job and save the data file and use the data file later to do post processing (saving screenshots) using the regular graphics interface ?

NormalVector September 9, 2012 21:31

Nice!

I'm not sure what you mean... you want, during a batch run, to save the case and data every N iterations? If so, you can set that up graphically before calculating in Calculation Activities>Autosave Every (...). Whether you run a batch job with the GUI enabled or not, Fluent should autosave. You can append flow time or iteration number to the data files.

It's worth mentioning that you can create animations (at least transient animations) with post processing software such as Tecplot on the fly. Is there any reason you want to use batch? I don't have Tecplot so I stick with batch animations.

dixitked September 9, 2012 23:05

I am running the project on Grid, so I have to use batch job to submit it.
I am trying to figure out if it is possible to do it in 2 steps:
1. To solve the case on grid using batch job. And then do:
2. Image generation as post processing on my machine.

Thanks

NormalVector September 10, 2012 11:47

Yes, you can output pictures every N timesteps/iterations and then string them together to make a movie. Look into "ffmpeg" as this is what I use on my computing cluster and it can handle the .ppm images Fluent outputs. I suppose you could also save data files and then write a script to read the case and each data file and output pictures without having to run the simulation again.

Otherwise you can save data every N timesteps/iterations and use a postprocessing software. I believe Tecplot can import the data files you saved and make animations of different field variables.

Vietazz June 1, 2015 08:42

Hi everyone.

I know that it's too late to help you with my answer. But I run into the same
problem, and I find a solution that may help someone struggling with the same problem. In fact the command you have to type to run a journal in a batch mode in Fluent is :
Fluent 2ddp -gu -driver null -i journ.jou >& listing &

Good luck :D


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