CFD Online Discussion Forums

CFD Online Discussion Forums (
-   Fluent UDF and Scheme Programming (
-   -   saving grafics in batch-mode (

Robert@cfd February 26, 2010 06:29

saving grafics in batch-mode
Hello forum

I already read some other threads here and elsewhere how to save e.g. velocity-plots while making a simulation without gui.
So I tried:

"-g" => errors, because of disabled grafics
"-gu -driver null" => no errors but no saved grafics
"-gu -driver x11" => no errors, grafical windows were shown for every timestep/iteration but again no pictures are saved
"-gu -driver opengl" => same like with x11

in my .scm-file including the scheme-commands I defined the executing commands for opening a window, setting the right view and taking a hardcopy after each timestep

Im doing parallel job on a linux workstation

Robert@cfd April 5, 2010 19:22

I guess its not possible to save grafics while working in batch-mode.

Any Ideas would be highly appreciated!


coglione April 6, 2010 04:11

Hi Robert,

all I can say is that running fluent in the background using -gu -driver null and taking hardcopies at several timesteps works for me on a linux-cluster. I had to play around a little bit with my journal file to get all scheme commands working properly, maybe you should post your scheme-file and i will have a look at it.


Robert@cfd April 6, 2010 08:14

Hi coglione, thx for your help.


/display/set/picture/color-mode color
/display/set/picture/driver png
/display/set/picture/x-resolution 1600
/display/set/picture/y-resolution 1200

/solve/execute-commands/add-edit com1 1 "time-step" "/display/open 9"
/solve/execute-commands/add-edit com2 1 "time-step" "/display/contour mixture velocity-magnitude"
/solve/execute-commands/add-edit com3 1 "time-step" "/display/views/camera/position 0 0 0"
/solve/execute-commands/add-edit com3 1 "time-step" "/display/views/default-view"
/solve/execute-commands/add-edit com4 1 "time-step" "/display/views/camera/zoom 5"
/solve/execute-commands/add-edit com5 1 "time-step" "/display/views/camera/target 24 5 -2.5"
/solve/execute-commands/add-edit com6 1 "time-step" "/display/hardcopy  vel_%t.png"

Im running following command in the console:

./fluent 3ddp -g -t6 < /home/.../batch.scm > /home/.../out.dat 2> /home/.../out.error -ssh
# or the "-gu -driver null"

An excerpt of the batch-file is postet above, but I dont think there are faults in the commands, because I tried all of them in the text user interface in FLUENT

# edit: im working on a linux-cluster, too


coglione April 7, 2010 02:51

Hi Robert,
i see you already work with Ansys12. I'm still on 6.3 and therefor not sure if there have been some changes regarding your topic. However, it is actually not a good idea to open an window with /display/open if you are in background mode and graphics driver is explicitly set to null. display/set is what i use, maybe you should give it a try.

Robert@cfd April 9, 2010 13:03


So you mean "/display/set-window 9" ?
Its not working as well.

I just made the most simple case-file I can imagine, the elbow-file from the first tutorial


rc /home/.../elbow1.cas
/display/set/picture/driver png
it 5
/display/set-window 9
/display/contour velocity-magnitude
/display/hardcopy vel.png

The error is following:

================================================== ============================
Stack backtrace generated for process id 9140 on signal 11 :
Please include this information with any bug report you file on this issue!
================================================== ============================

Error: Cortex received a fatal signal (SEGMENTATION VIOLATION).
Error Object: ()

thx for ur help

All times are GMT -4. The time now is 20:35.