CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM Paraview & paraFoam (
-   -   Animating Lagrangian Particles in ParaView (

xiao April 7, 2008 22:18

Could any one tell me whether
Could any one tell me whether it is possible to animate particle movements in ParaView? I am referring the post two years ago (see below). I was able to use foamToVTK to convert the foam data to paraview format and visialuze them in paraview. However, I need to use "glyph" to filter every frame (time step), and I don't know how to animate the spearate "glyphs". Is that even possible?

I also tried other approaches, i.e. build ParaView 3.3 with the reader, but I wasn't able to compile Cmake, which is requried for building ParaView ... Is it possible to build the reader alone and use the _precomplied_ ParaView 3.2? I doubt it.

The dxFoam approach seemed quite completed too according to what I undersand now: first download dxFoam with earlier version of OF and compile, and then download dxFoamExec, and then install OpenDX ...

These are the three ways I know of to visualize largangian particle, after searching the forum. The first one is best suited for my case right now, except I can't animate it right now. Are there any easier ways to do that? or am I not understanding these alternatives correctly? Any hint is greatly appreciated.

By Bernhard Gschaider on Tuesday, March 21, 2006 - 02:20 pm: Edit Post

paraFoam can't do it, but paraview can. Look at ocessing_of_Lagrangian_particles
(which references

7islands April 7, 2008 23:37

Hi Heng, I'm not an expert in
Hi Heng,
I'm not an expert in postprocessing Lagrangian particles, but I guess others could give better suggestions if you clarify the followings:

* If you read a sequence of .vtk files as a file series, not as each single file, I guess you don't have to apply the filter every timestep. Or am I missing something?
* As far as I know most of Linux distros have precompiled CMake packages. Or precompiled CMake binaries for various platforms are provided at So on most systems you don't have to compile CMake by yourself. Are you working on some exotic system where precompiled CMake binaries are not available?


xiao April 8, 2008 01:38

Hi Takuya, Thanks for the r
Hi Takuya,

Thanks for the reply, and for the Reader. The patch worked fine.

I tried on both systems: Mac OS 10.5, and LInux (CentOS 2, which is essentially RedHat). I did not work on either system. I felt a little weird too.

The story with Mac was that:

I unziped cmake and ran:

> ./bootstrap

Here is what I got:

CMake 2.4-8, Copyright (c) 2006 Kitware, Inc., Insight Consortium
Error when bootstrapping CMake:
Cannot find appropriate C compiler on this system.
Please specify one using environment variable CC.
See cmake_bootstrap.log for compilers attempted.

Since I am pretty sure the gcc and cpp worked fine on the Mac (10.5), I looked at the log file and identified the gcc section, it seems the problem is with dynamic library, not the compiler itself.

Try: gcc
Line: gcc cmake_bootstrap_703.test.c -o cmake_bootstrap_703.test
---------- file -----------------------
#ifdef __cplusplus
# error "The CMAKE_C_COMPILER is set to a C++ compiler"


#if defined(__CLASSIC_C__)
int main(argc, argv)
int argc;
char* argv[];
int main(int argc, char* argv[])
printf("%d\n", (argv != 0));
return argc-1;
/usr/bin/ld: /usr/lib/gcc/i686-apple-darwin8/4.0.1/../../../libSystem.dylib unknown flags (type) of section 6 (__TEXT,__literal16)
in load command 0
collect2: ld returned 1 exit status
Test failed to compile


xiao April 8, 2008 01:49

Continuation of the post above
Continuation of the post above:

I went further in Linux. First I installed the pre-compiled cmake, when I tried to run the following command:
xiao@cee-7tscp11:~/PV> ccmake ~/PV/ParaView3

I got:

Error running cmake::LoadCache(). Aborting.

Then, I tried to compile cmake from source, the ./bootstrap and gmake went through, but when I tried to install as root:

[root@cee-7tscp11 cmake-2.4.8]# gmake install

[100%] Built target documentation
Install the project...
bin/cmake: /usr/lib/ version `GLIBCXX_3.4.5' not found (required by bin/cmake)
make: *** [install] Error 1


Was it just bad luck or am I doing something stupid tonight? I was a bit tired, so maybe I did something wrong without knowing it ...

Any hint would be greatly appreciated.


xiao April 8, 2008 02:24

To Takuya -------------------
To Takuya
* If you read a sequence of .vtk files as a file series, not as each single file, I guess you don't have to apply the filter every timestep. Or am I missing something?

Yes, this is the case in ParaView 3.2. For the PV come with OF1.4.1, when I open files, the different time steps appear as individual files. (I first used foamToVTK to convert the file format since directly using "paraFoam" could not be able to display Lagrangian fields as particle trajectories).

I tried to use PV 3.2 to read the VTK files generated by foamToVTK, it does not work very well. Even though when I opened the file, it seemed to read in all the time steps, only one appear in the "Pipeline browser" window, and sometimes the fields do not appear in the drawdown menu of "Color by". i.e. even I have p and U field, the "Color by" drawdown menu only has option of "Solid Color", "Cell ID", "Cell Number".

I feel that I am stupid today and maybe asking stupid questions and doing stupid things... My apology.


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