I am opening legacy vtk files into Paraview. There are x, y, and z coordinates and I am interested in attaching a x-velocity value to each of the points. How do I incorporate this velocity data into my vtk files in such a way that Paraview can read it? I am ultimately trying to contour my cells based on the value of the velocity.
I am using Paraview 4.2 and here is my vtk file so far:
# vtk DataFile Version 4.1
vtk output
ASCII
DATASET RECTILINEAR_GRID
DIMENSIONS 7 27 1
X_COORDINATES 7 int
4200 4000 3800 3600 3400 3200 3000
Y_COORDINATES 27 int
400 450 500 550 600 650 700 750 800 850 900 950 1000 1050
1100 1150 1200 1250 1300 1350 1400 1450
1500 1550 1600 1650 1700
Z_COORDINATES 1 int
378
How do I incorporate the velocity data that I mentioned before?
Here is your file with an added “xVel” point data array.
# vtk DataFile Version 4.2
vtk output
ASCII
DATASET RECTILINEAR_GRID
DIMENSIONS 7 27 1
X_COORDINATES 7 int
4200 4000 3800 3600 3400 3200 3000
Y_COORDINATES 27 int
400 450 500 550 600 650 700 750 800
850 900 950 1000 1050 1100 1150 1200 1250
1300 1350 1400 1450 1500 1550 1600 1650 1700
Z_COORDINATES 1 int
378
POINT_DATA 189
SCALARS xVel double
LOOKUP_TABLE default
13.07 13.07 13.07 13.07 13.07 13.07 13.07 13.07 13.07
13.07 13.07 13.07 13.07 13.07 13.07 13.07 13.07 13.07
13.07 13.07 13.07 13.07 13.07 13.07 13.07 13.07 13.07
13.07 13.07 13.07 13.07 13.07 13.07 13.07 13.07 13.07
13.07 13.07 13.07 13.07 13.07 13.07 13.07 13.07 13.07
13.07 13.07 13.07 13.07 13.07 13.07 13.07 13.07 13.07
13.07 13.07 13.07 13.07 13.07 13.07 13.07 13.07 13.07
13.07 13.07 13.07 13.07 13.07 13.07 13.07 13.07 13.07
13.07 13.07 13.07 13.07 13.07 13.07 13.07 13.07 13.07
13.07 13.07 13.07 13.07 13.07 13.07 13.07 13.07 13.07
13.07 13.07 13.07 13.07 13.07 13.07 13.07 13.07 13.07
13.07 13.07 13.07 13.07 13.07 13.07 13.07 13.07 13.07
13.07 13.07 13.07 13.07 13.07 13.07 13.07 13.07 13.07
13.07 13.07 13.07 13.07 13.07 13.07 13.07 13.07 13.07
13.07 13.07 13.07 13.07 13.07 13.07 13.07 13.07 13.07
13.07 13.07 13.07 13.07 13.07 13.07 13.07 13.07 13.07
13.07 13.07 13.07 13.07 13.07 13.07 13.07 13.07 13.07
13.07 13.07 13.07 13.07 13.07 13.07 13.07 13.07 13.07
13.07 13.07 13.07 13.07 13.07 13.07 13.07 13.07 13.07
13.07 13.07 13.07 13.07 13.07 13.07 13.07 13.07 13.07
13.07 13.07 13.07 13.07 13.07 13.07 13.07 13.07 13.07
Could you explain how you added the xVel array, is there an easy method to generalize it for other vtk files?
You mean in ParaView ?
You can add a Calculator Filter