CFD Online Discussion Forums

CFD Online Discussion Forums (
-   FLUENT (
-   -   animation form dat files (

user October 24, 2003 07:31

animation form dat files

I made my unsteady simulation and saves the case file and all the dat files (for each time step).

Can someone please tell me how can I now make an animation. I want fluent to read the dat file make an image and save it (for each time step).

Can this be done automaticly or do I have to open each file manually????

Help please


ap October 24, 2003 08:06

Re: animation form dat files
FLUENT animations don't work that way.

You have to define an animation (Define -> Animation) before you start the calculation, choosing the view, the colours scale and how often you want to save a frame (see the manual for more details).

When you completed the definition of the animation, just run the calculation. At the end you can create an mpeg file.

Hi :)


user October 24, 2003 08:11

Re: animation form dat files

But what if i don't know what do i want to animate prior to simulation. Or if i want it in a different colour later???

david October 24, 2003 08:34

Re: animation form dat files

you need to define first what you want to animate otherwise you would save all the data?

well, you can at least define what you want to animate, few parameters, by going to solve->animate-> define.

On animation sequences you define the number of sequences you want to save for animation prior to the simulation. On the right you have the case bottom called define where you can define all the parameters you might be interested in.

Hope this helps


Tim October 24, 2003 13:51

Re: animation form dat files
Good day,

I've had the same frustrating realisation (having to think of what I want to aminmate before iterating). The only way I can foresee around this is to use the autosave function (File -> Write -> Autosave) then enter how often you want a dat file saved (once every X timesteps). I don't think that you'd be able to go back into FLUENT and animate this way, but probably need to use an external visualisation program like FieldView or Tecplot. I suspect that this way will still be painfully time consuming.

Cheers, Tim.

anton October 24, 2003 18:54

Re: animation form dat files
Yes, you can read in all the dat files and make an image and save it for each dat file you read in. You need to create a journal file. In the journal file you write commands to read in each dat file, plot a contour, hardcopy a tiff, and then repeat for all the dat files you have. It is very easy, and the preferred way to make an animation. It will take a bit of time to write the journal file, but once it's done, you just read the journal file in fluent, and fluent will automatically create your tif files.

Alamgir October 26, 2003 20:22

Re: animation form dat files
Hi Anton,

I'm in same position like user, so if don't mind give us an example of journal writing (I know very little writing journal)


user October 27, 2003 03:34

Re: animation form dat files

Yes please give us an example of journal....


Anton November 1, 2003 20:02

Re: animation form dat files
Suppose you have a case file with 4 dat files:

myexample.cas.gz myexample001.dat.gz myexample002.dat.gz myexample003.dat.gz myexample004.dat.gz

Suppose you want to generate 4 tiff files of velocity magnitude (with scale 0 to 10 m/s) on a plane (say plane-x) from each dat file. Here's how to do it automatically using a journal file. Using a text editor (any text editor will do, even notepad!) write the following commands:

rd myexample001.dat.gz display contour velocity 0 10 display hardcopy myexample001.tif

rd myexample002.dat.gz display contour velocity 0 10 display hardcopy myexample002.tif

rd myexample003.dat.gz display contour velocity 0 10 display hardcopy myexample003.tif

rd myexample004.dat.gz display contour velocity 0 10 display hardcopy myexample004.tif

Save the above file, call it myexample.jou

In Fluent, setup your hardcopy options, ie., set the file format to tiff, change to colour, set the resolution, click apply. Set the display the way you want, ie., the orientation of the geometry,etc.

Then, just read in the journal file created above:


And Fluent will automatically read in the dat file, generate the contour plot, hardcopy the tiff, and repeat according to the commands in the journal file.

Now, if you've got a 1000 dat files, then it would a tedious task to copy and paste each statement above 1000 times, to say the least!. So, in that case, just write a C program for example to generate the journal file by looping through incrementing for each dat file.

Anton November 1, 2003 20:10

Re: animation form dat files- CORRECTION
In the above journal file, the statement:

display contour velocity 0 10

should be:

display contour plane-x velocity-magnitude 0 10

and should be on a new line. In fact, each statement starting with "display" should be on a new line.

All teh commands are just taken from the text user interface. Just go through the text user interface to see the sequence of commands necessary. ALMOST everything can be done through the text user interface.

user November 7, 2003 05:09

Re: animation form dat files- CORRECTION
Hi Anton!

Thanks for your help but i still have problems. After runing the journal file I get this message from Fluent:
:rd test.dat Reading "test01.dat"... Done.

> display contour velocity invalid command [velocity]

>display hardcopy test01.jpg

It makes 4 jpgs but only from a window that is open - where i set the image (not from the desired dat file)

The same thing is if i write velocity-magnitude, or velocity magnitude contour...

Can you tell me what am i doing wrong...

Thanks in advance


All times are GMT -4. The time now is 12:29.