CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   ParaView (https://www.cfd-online.com/Forums/paraview/)
-   -   [General] Glyths plot with cell_data vectors (https://www.cfd-online.com/Forums/paraview/135709-glyths-plot-cell_data-vectors.html)

RicardoGoncalves May 16, 2014 13:04

Glyths plot with cell_data vectors
 
Hi
I'm writing a code that outputs three vectors components at the centre of each triangular cell.
The .vtk file opens fine and the visualization of the magnitude of the vectors look fine.
However, when I try to visualize the vectors themselves (glyth), all of the are shown as if they were point-data, and are patently wrong (they are horizontal vectors, rather than vectors with three finite components).
Any help would be highly welcome.
R

wyldckat May 16, 2014 15:54

Greetings Ricardo,

Any chance you can provide a small example file?

Best regards,
Bruno

RicardoGoncalves May 16, 2014 16:57

Yes, thanks:

Code:

# vtk DataFile Version 3.0
model outputs
ASCII
DATASET POLYDATA
POINTS 1465 double
500397.490000 103751.070000 0.000000 ...

TRIANGLE_STRIPS 2818 11272
3 1380 1381 756 3 707 704 755 3 1380  ...

CELL_DATA 11272
scalars cellvar double
LOOKUP_TABLE default
0.193064 -1.840271 0.016829 0.012930 0.016424 0.052549 0.018979 0.020069 0.020000 ...

VECTORS vect double
0.51000 0.320000 0.000000
-1.104062 -1.543125 0.000000
0.005260 -0.003182 0.000000 ...


wyldckat May 17, 2014 13:25

Hi Ricardo,

Actually, I was referring to a small example file that could be used for doing some tests.

Anyway, a sample of the file you have does give some additional information that came in handy to figure out some details:
  1. Triangle strips sometimes aren't very good for post-processing. You might need to apply an auxiliary filter, such as "Triangulate" or "Extract Surface", in order for it to be processable with some other filters.
  2. Glyphs by default work with point data on the vertexes of the mesh. If you need to have a vector representation on the centers of the faces of the mesh, you need to first use the filter "Cell Centers", which should create the points for the centers of the cells, along with the data for those cells. In this case, the cells are the mesh faces.
Best regards,
Bruno

RicardoGoncalves May 19, 2014 13:18

Thanks Bruno, makes sense. I sorted it out by applying the Cell Center filter.
R


All times are GMT -4. The time now is 04:33.