CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM (https://www.cfd-online.com/Forums/openfoam/)
-   -   Velocity vector data in OpenFOAM and ParaView mismatch (https://www.cfd-online.com/Forums/openfoam/70047-velocity-vector-data-openfoam-paraview-mismatch.html)

tekky November 12, 2009 18:12

Velocity vector data in OpenFOAM and ParaView mismatch
 
Hi,

I was wondering whether anyone can help me on understanding how vectors are saved in OpenFOAM. For instance, I am using the cavity example in the OpenFOAM tutorial. The grid mesh is a regular 20x20x1 = 400 cells, and through ParaView, I can see that there are 441 points.

By using the spreadsheet view in ParaView, each point is mapped to a velocity vector. However, upon investigating whether a velocity vector shown in ParaView is also stored in the U file (say in 0.1s folder), I was unable to find it.

I am confused as to what the 400 vectors (internal field) listed in the U file corresponds to what point on the mesh, and why ParaView appears to have different velocity vectors than the one stored in the file.

I would be grateful if someone could help clear this up for me!

lin November 12, 2009 20:47

20 cells corresponds to 21 points.

tekky November 13, 2009 04:02

My main confusion, is why the points shown in ParaView, give different velocity vectors as the one stated in the U file.

Also, the U file specifies 400 'internal field' vectors. If we consider that the total number of points is 21x21 = 441 points, then by removing the outer points (i.e. fixed walls, movingWall), as they should obviously be mapped to uniform (1,0,0) and uniform (0,0,0) respectively, I get:

441 - 80 = 361 (internal points)

If my calculations are correct, what does the 400 'internal field' vectors stored in the U file correspond to?

olesen November 13, 2009 04:17

Quote:

Originally Posted by tekky (Post 236092)
My main confusion, is why the points shown in ParaView, give different velocity vectors as the one stated in the U file.

Also, the U file specifies 400 'internal field' vectors. If we consider that the total number of points is 21x21 = 441 points, then by removing the outer points (i.e. fixed walls, movingWall), as they should obviously be mapped to uniform (1,0,0) and uniform (0,0,0) respectively, I get:

441 - 80 = 361 (internal points)

If my calculations are correct, what does the 400 'internal field' vectors stored in the U file correspond to?

The internal field values are the cell values (the volume field), as expected.
ParaView, however, displays vectors for points not cells. Thus the vectors displayed are interpolated from the volume field, but with the ones on the boundary being interpolated from the corresponding face fields.
If you examine the vector glyphs in paraview, they are probably coloured with something like 'volPointInterpolate(U)' rather than a simple 'U'.

tekky November 13, 2009 04:26

Thanks olesen for your reply. Do you know how I can extract/export the vectors at each point in ParaView at a time-step from the Spreadsheet view?

I am using the Extract Selection (selecting the points), but I would somehow like to copy the vectors ParaView uses, along with the co-ordinate positions of the vector into a file.

olesen November 13, 2009 04:31

Quote:

Originally Posted by tekky (Post 236098)
Thanks olesen for your reply. Do you know how I can extract/export the vectors at each point in ParaView at a time-step from the Spreadsheet view?

Sorry, I don't know my way around paraview that well.

gschaider November 18, 2009 10:24

Quote:

Originally Posted by tekky (Post 236098)
Thanks olesen for your reply. Do you know how I can extract/export the vectors at each point in ParaView at a time-step from the Spreadsheet view?

I am using the Extract Selection (selecting the points), but I would somehow like to copy the vectors ParaView uses, along with the co-ordinate positions of the vector into a file.

Just select the Spreadsheet-View, go to File->Export and a CSV-file will be written (Disclaimer: in the version I am using. Paraview is a bit of a moving target)

Bernhard

tekky November 20, 2009 17:31

Hi Bernhard

Thanks for the reply. I tried your method, but when I select the Spreadsheet-View, the 'export' command is unavailable i.e. blanked out. I am using ParaView 3.3 for MacOSX. Perhaps this might be the reason?

The only options available are Save Data, Save Screenshot, Save Animation. I have tried using Save Data, but it is not what I wanted (it saves a .vtm file)

gschaider November 23, 2009 13:59

Quote:

Originally Posted by tekky (Post 237114)
Hi Bernhard

Thanks for the reply. I tried your method, but when I select the Spreadsheet-View, the 'export' command is unavailable i.e. blanked out. I am using ParaView 3.3 for MacOSX. Perhaps this might be the reason?

The only options available are Save Data, Save Screenshot, Save Animation. I have tried using Save Data, but it is not what I wanted (it saves a .vtm file)

Probably. The "smallest" 3.x I have available is 3.4 (on Linux and Mac) and both show Export below the "Save Screenshot" (what can be exported depends on the selected view)

Bernhard

hamcer December 21, 2009 11:26

hello to all,
I wd like locate the points which their normal velocity are nul in order to locate the interfas surface between two phases (water and air), but, I can't find a relation between the coordinates points and the velocity vectors,
in paraview for example, when i use glyph i look in statistics view (cavity tutorials) 400 points for cavity.openfoam and 27342 points for glyph1. which the difference?
I w'd like a velocity vector for each cell or point from mesh; how i can do that.
can any one help me.
Thanks in advance.,


All times are GMT -4. The time now is 03:30.