[Paraview] paraview .vtk file format.

Martin Jørgensen s022826 at student.dtu.dk
Tue Apr 11 15:48:02 EDT 2006


Hi,

I'm a complete newbie, so please don't be too hard on me if I ask  
something stupid or if the information is clearly available somewhere  
I didn't look... I downloaded the "VTK file formats" pdf-file, but  
that's a lot of information for a newbie... So:

I've made a program in C that computes a couple of temperatures and  
saves the result in a 2D-array as a function of timestep... (well,  
the 2D array is overwritten each timestep, but I want to save them in  
a file as a function of the timestep). And then I want to be able to  
choose which time-step to look at in paraview...

I've made this .vtk-file manually just to get a feeling of how it  
works (here I'm only looking at 2 temperatures):

- - - -
# vtk DataFile Version 2.0
Cube example
ASCII
DATASET POLYDATA
POINTS 12 float
0.0 0.0 0.0
0.4 0.0 0.0
1.0 0.0 0.0
0.0 1.0 0.0
0.4 1.0 0.0
1.0 1.0 0.0
0.0 0.0 0.1
0.4 0.0 0.1
1.0 0.0 0.1
0.0 1.0 0.1
0.4 1.0 0.1
1.0 1.0 0.1


POLYGONS 7 35
4 0 1 4 3
4 1 2 5 4
4 6 8 11 9
4 3 5 11 9
4 0 2 8 6
4 0 6 9 3
4 2 8 11 5

CELL_DATA 7
SCALARS temperature double 1
LOOKUP_TABLE default
700.0
500.0
20.0
20.0
20.0
20.0
20.0

- - - -
Questions:

1) The above works but how do I insert comments? For instance I would  
like to be able to write "4 0 1 4 3      # front" and "0.0 0.0  
0.1      # point 6", just as a reminder to myself... Is it possible?

2) How to insert additional time-steps??? For instance, the  
temperatures at the next time-step could look like:

LOOKUP_TABLE default
675.4
491.1
35.2
23.0
20.2
20.0
20.0

And for future time-steps I would get other temperatures etc...

3) I have a lot of problems figuring out how to program a more  
complex method of storing the temperatures for each cell and  
calculating the points and figuring out how to connect these  
points... Is there any hints on doing this or perhaps somebody  
already programmed something in C?

Thanks in advance for any help...


Martin


More information about the ParaView mailing list