CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM Paraview & paraFoam (
-   -   Annotating parafoam with timestep info (

roncresswell September 19, 2005 01:37

Anybody know whether it's poss
Anybody know whether it's possible to annotate a keyframe animation in paraview so that the solution time is on the image and updates as the animation proceeds?

Thanks in advance,


theof April 21, 2006 09:46

This has been recently discuss
This has been recently discussed into the paraview mailing list, look at the thread Live Annotation

Thinking about adding it to the PVFoamReader...

rafal May 18, 2007 19:09

I have similar problem. Basica
I have similar problem. Basically I just want
to show time (in seconds) in the image. I have
found similar solution on Kitware website,
but it displays frame number and not real time.

the solution was to write this thing (below)
in annotate:
Time: [[[[$Application GetMainWindow] GetAnimationManager] GetAnimationScene] GetAnimationTime]

Is there an easier way to get required time?
Do I really need to write this kind of spells?
and more important what spell to cast in order
to get time in seconds?

I appreciate any help (or where to look for help).
Thanks in advance.

hartinger May 19, 2007 09:37

hey i dunno know how it's d

i dunno know how it's done in paraview, but you could use 'convert' to add it afterwards with a little script

convert -draw "text 25,60 '0.002s'" yourPic.png

'convert' you get from:

rafal May 19, 2007 09:56

Thank you Markus for your repl
Thank you Markus for your replay. It seams
that i will need to come back to old good
imagemagick and convert

First take pictures from paraview as .jpg.
Than by convert add text (from names of files)
to .jpg files.
and at the end use once again convert to
make a movie.
But the problem is that the last convert
to make a movie uses lots of resources
(temp storage, and takes ages)

Is there a simpler way of doing it from paraview
only?? It should be a trivial thing to include
time on a slide. isnt it?
anyone any idea?

rafal May 19, 2007 10:07

I forgot to mention that i fig
I forgot to mention that i figured out how to obtain
this effect if we have constant time step. We can
take use of tcl/tk and correct previous command to:

Time: [expr [[[[$Application GetMainWindow] GetAnimationManager] GetAnimationScene] GetAnimationTime]*0.5] s

where 0.5 would be a timeStep. but my time step is not constant so i am still in the same place.
waiting for other suggestions. or maybe... is there a way to get time step in paraview?
or maybe other solution? anyone?

liu May 21, 2007 13:10

Tecplot if you have the licens
Tecplot if you have the license.

dmoroian May 22, 2007 03:43

Hi Rafal, Maybe you should co
Hi Rafal,
Maybe you should consider OpenDX. OpenFOAM has an excellent writer for it (dxFoam).
It is at least feature rich as paraview, if not more, and definitely it is very easy to add any kind of text to each frame, like the name of the current time directory.


rafal May 28, 2007 08:14

Xiaofeng, yes if i only have a
Xiaofeng, yes if i only have a license

Dragos, I spoke with you about OpenDx during SIMDI'06 in Goetheborg. I know you are a big fan of it. I tried some examples than, like you advised me. It seemed to me that i need to learn a lot of things about it to use it. Now I think it is worth to spend 2-3 weeks to learn it and not have such a simple and difficult problems with paraview.

I didnt find solution in paraView. For the recent presentation i had, I just recalculated everything with constant timestep and used annotation method described above. Dummy's solution. I will move to OpenDx once I have some free time to learn it more. Thanks Dragos.


dmoroian May 29, 2007 03:36

Hi Rafal, I'm impressed that
Hi Rafal,
I'm impressed that you remembered me. Regarding OpenDX and its easiness of usage, I can make a parallel to OpenFOAM. Wasn't very hard to learn it in the beginning, and maybe it is still? But how great is it now, when you think of its potential?

I hope we can meet again at future OpenFOAM workshops.


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