# Velocity vector data in OpenFOAM and ParaView mismatch

 User Name Remember Me Password
 Register Blogs Members List Search Today's Posts Mark Forums Read

 November 12, 2009, 18:12 Velocity vector data in OpenFOAM and ParaView mismatch #1 New Member   David Chung Join Date: Oct 2009 Posts: 5 Rep Power: 16 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!

 November 12, 2009, 20:47 #2 Senior Member   Hua Zen Join Date: Mar 2009 Posts: 138 Rep Power: 17 20 cells corresponds to 21 points.

 November 13, 2009, 04:02 #3 New Member   David Chung Join Date: Oct 2009 Posts: 5 Rep Power: 16 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?

November 13, 2009, 04:17
#4
Senior Member

Mark Olesen
Join Date: Mar 2009
Location: https://olesenm.github.io/
Posts: 1,714
Rep Power: 40
Quote:
 Originally Posted by tekky 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'.

 November 13, 2009, 04:26 #5 New Member   David Chung Join Date: Oct 2009 Posts: 5 Rep Power: 16 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.

November 13, 2009, 04:31
#6
Senior Member

Mark Olesen
Join Date: Mar 2009
Location: https://olesenm.github.io/
Posts: 1,714
Rep Power: 40
Quote:
 Originally Posted by tekky 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.

November 18, 2009, 10:24
#7
Assistant Moderator

Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51
Quote:
 Originally Posted by tekky 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

 November 20, 2009, 17:31 #8 New Member   David Chung Join Date: Oct 2009 Posts: 5 Rep Power: 16 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)

November 23, 2009, 13:59
#9
Assistant Moderator

Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51
Quote:
 Originally Posted by tekky 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

 December 21, 2009, 11:26 #10 Member   hamdi Join Date: Mar 2009 Posts: 75 Rep Power: 17 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.,

 Thread Tools Search this Thread Search this Thread: Advanced Search Display Modes Linear Mode

 Posting Rules You may not post new threads You may not post replies You may not post attachments You may not edit your posts BB code is On Smilies are On [IMG] code is On HTML code is OffTrackbacks are Off Pingbacks are On Refbacks are On Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post linnemann OpenFOAM Installation 7 July 30, 2009 03:14 quartzian OpenFOAM Installation 0 September 8, 2008 09:29 mirko OpenFOAM Installation 2 August 12, 2008 18:07 jussi OpenFOAM Installation 0 April 24, 2008 14:25 jjhall OpenFOAM Installation 3 April 17, 2008 12:59

All times are GMT -4. The time now is 16:17.

 Contact Us - CFD Online - Privacy Statement - Top