CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM

Velocity vector data in OpenFOAM and ParaView mismatch

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 12, 2009, 19:12
Default Velocity vector data in OpenFOAM and ParaView mismatch
  #1
New Member
 
David Chung
Join Date: Oct 2009
Posts: 5
Rep Power: 17
tekky is on a distinguished road
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!
tekky is offline   Reply With Quote

Old   November 12, 2009, 21:47
Default
  #2
lin
Senior Member
 
Hua Zen
Join Date: Mar 2009
Posts: 138
Rep Power: 17
lin is on a distinguished road
20 cells corresponds to 21 points.
lin is offline   Reply With Quote

Old   November 13, 2009, 05:02
Default
  #3
New Member
 
David Chung
Join Date: Oct 2009
Posts: 5
Rep Power: 17
tekky is on a distinguished road
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?
tekky is offline   Reply With Quote

Old   November 13, 2009, 05:17
Default
  #4
Senior Member
 
Mark Olesen
Join Date: Mar 2009
Location: https://olesenm.github.io/
Posts: 1,714
Rep Power: 40
olesen has a spectacular aura aboutolesen has a spectacular aura about
Quote:
Originally Posted by tekky View Post
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'.
olesen is offline   Reply With Quote

Old   November 13, 2009, 05:26
Default
  #5
New Member
 
David Chung
Join Date: Oct 2009
Posts: 5
Rep Power: 17
tekky is on a distinguished road
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.
tekky is offline   Reply With Quote

Old   November 13, 2009, 05:31
Default
  #6
Senior Member
 
Mark Olesen
Join Date: Mar 2009
Location: https://olesenm.github.io/
Posts: 1,714
Rep Power: 40
olesen has a spectacular aura aboutolesen has a spectacular aura about
Quote:
Originally Posted by tekky View Post
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.
olesen is offline   Reply With Quote

Old   November 18, 2009, 11:24
Default
  #7
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51
gschaider will become famous soon enoughgschaider will become famous soon enough
Quote:
Originally Posted by tekky View Post
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
gschaider is offline   Reply With Quote

Old   November 20, 2009, 18:31
Default
  #8
New Member
 
David Chung
Join Date: Oct 2009
Posts: 5
Rep Power: 17
tekky is on a distinguished road
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)
tekky is offline   Reply With Quote

Old   November 23, 2009, 14:59
Default
  #9
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51
gschaider will become famous soon enoughgschaider will become famous soon enough
Quote:
Originally Posted by tekky View Post
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
gschaider is offline   Reply With Quote

Old   December 21, 2009, 12:26
Default
  #10
Member
 
hamdi
Join Date: Mar 2009
Posts: 75
Rep Power: 17
hamcer is on a distinguished road
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.,
hamcer is offline   Reply With Quote

Reply


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 Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
OpenFOAM 1.5.x package - CentOS 5.3 x86_64 linnemann OpenFOAM Installation 7 July 30, 2009 04:14
Installing OpenFOAM without Paraview quartzian OpenFOAM Installation 0 September 8, 2008 10:29
64bitrhel5 OF installation instructions mirko OpenFOAM Installation 2 August 12, 2008 19:07
Adventure of fisrst openfoam installation on Ubuntu 710 jussi OpenFOAM Installation 0 April 24, 2008 15:25
Paraview installation troubles jjhall OpenFOAM Installation 3 April 17, 2008 13:59


All times are GMT -4. The time now is 09:00.