CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Paraview & paraFoam

Native ParaView Reader Bugs

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree3Likes

Reply
 
LinkBack Thread Tools Display Modes
Old   February 25, 2010, 09:30
Default
  #201
Senior Member
 
Sandeep Menon
Join Date: Mar 2009
Location: Amherst, MA
Posts: 390
Rep Power: 16
deepsterblue will become famous soon enough
Ideally, I'd like to Glyph the fluxes at face centres. So, a glyph in the face-normal direction if the flux is positive, and vice-versa. That's basically what I'm looking for. Is this possible?
__________________
Sandeep Menon
University of Massachusetts Amherst
https://github.com/smenon
deepsterblue is offline   Reply With Quote

Old   February 25, 2010, 09:39
Default
  #202
Senior Member
 
Mark Olesen
Join Date: Mar 2009
Location: http://olesenm.github.io/
Posts: 784
Rep Power: 19
olesen will become famous soon enough
Quote:
Originally Posted by deepsterblue View Post
Ideally, I'd like to Glyph the fluxes at face centres. So, a glyph in the face-normal direction if the flux is positive, and vice-versa. That's basically what I'm looking for. Is this possible?
In that case, you could try out this workaround (which would only work for scalar surface fields): write out the face centroids as positions and the <scalar surface field> x the <face area vector> as vectors at these points.
This would equivalent to a Lagrangian field (cloud) and you could glyph that immediately.
olesen is offline   Reply With Quote

Old   February 25, 2010, 12:00
Default
  #203
Senior Member
 
Sandeep Menon
Join Date: Mar 2009
Location: Amherst, MA
Posts: 390
Rep Power: 16
deepsterblue will become famous soon enough
This could be a convenient workaround for now, yes. I can't seem to find an example of constructing a cloud with position vectors (face-centres), though. Could you point me to the most relevant Lagrangian class?
__________________
Sandeep Menon
University of Massachusetts Amherst
https://github.com/smenon
deepsterblue is offline   Reply With Quote

Old   February 26, 2010, 05:51
Default Symmetric Tensor
  #204
New Member
 
Matteo Carpentieri
Join Date: Mar 2009
Posts: 28
Rep Power: 9
mcarpe is on a distinguished road
Hi all

I may have found a bug in the native paraView reader. I'm using OpenFoam 1.6.x with the packaged ParaView (3.6) from the ThirdParty directory.

When I visualise data from R (the Reynolds stress tensor) I believe ParaView picks up the wrong components.
The order of the 6-component array (symmTensorField) is intepreted by PV as Rxx Ryy Rzz Rxy Rxz Ryz, while the correct order in OpenFoam is Rxx Rxy Rxz Ryy Ryz Rzz.

Please tell me if I'm wrong...
Cheers

Matteo
mcarpe is offline   Reply With Quote

Old   February 26, 2010, 06:01
Default
  #205
Senior Member
 
Mark Olesen
Join Date: Mar 2009
Location: http://olesenm.github.io/
Posts: 784
Rep Power: 19
olesen will become famous soon enough
Quote:
Originally Posted by deepsterblue View Post
This could be a convenient workaround for now, yes. I can't seem to find an example of constructing a cloud with position vectors (face-centres), though. Could you point me to the most relevant Lagrangian class?
There are classes available in src/lagrangian/basic:
  • IOPosition/
  • passiveParticle/

However, the simplest would probably be to simply examine the output (eg, by tutorials/combustion/dieselFoam/aachenBomb) and forge the output files yourself.
olesen is offline   Reply With Quote

Old   February 26, 2010, 06:09
Default
  #206
Super Moderator
 
Takuya OSHIMA
Join Date: Mar 2009
Location: Niigata City, Japan
Posts: 518
Blog Entries: 1
Rep Power: 12
7islands is on a distinguished road
Hi Matteo,
That's intended. The reader reorders the symmTensor components so that the order matches with the order shown in the selection combo box of the ParaView GUI.

symmTensorComponents.png

Note that the component order is defined by the ParaView GUI so every reader has to follow the order (readers cannot change the order displayed in the component selection).

Takuya

Last edited by 7islands; February 26, 2010 at 06:19. Reason: Hit post too early; added a note
7islands is offline   Reply With Quote

Old   February 26, 2010, 07:27
Default
  #207
New Member
 
Matteo Carpentieri
Join Date: Mar 2009
Posts: 28
Rep Power: 9
mcarpe is on a distinguished road
Quote:
Originally Posted by 7islands View Post
Hi Matteo,
That's intended. The reader reorders the symmTensor components so that the order matches with the order shown in the selection combo box of the ParaView GUI.

Note that the component order is defined by the ParaView GUI so every reader has to follow the order (readers cannot change the order displayed in the component selection).

Takuya
Takuya, thanks for the quick reply.

However, my post wasn't too clear, I'm afraid.

What I mean is that the reordering you mention is not done properly (at least with my data). I'm not concerned with the order. If ParaView orders the components like in the image you posted, it's fine for me, as long as it picks up the right components of the original data.

For example: I'm trying to visualise the boundary conditions for the inlet patch, so I know the values in advance. And I know that R is something like this:

(<positive value> 0 <negative value> <positive value> 0 <positive value>)

This, in OpenFoam means: xx xy xz yy yz zz

When I try to visualise it with paraFoam, I see the correct values ONLY for xx. When i visualise yy i see all 0 values (like xy in the original data). When i visualise zz i see negative values (like xz in the original data) which is clearly wrong, since Rzz can't be negative. An so on...

So, I think the bug is in the fact that the reordering you mention is not performed at all.

I hope it is clearer now

Thanks for your help
Matteo
mcarpe is offline   Reply With Quote

Old   February 26, 2010, 07:57
Default
  #208
Super Moderator
 
Takuya OSHIMA
Join Date: Mar 2009
Location: Niigata City, Japan
Posts: 518
Blog Entries: 1
Rep Power: 12
7islands is on a distinguished road
Matteo,
paraFoam?? Sorry but I'm confused. To clarify, which reader are you talking about (PV3FoamReader or vtkPOpenFOAMReader)? The reader I'm talking about (and am responsible for) is vtkPOpenFOAMReader, which has nothing to do with the paraFoam script.

Takuya
7islands is offline   Reply With Quote

Old   February 26, 2010, 08:07
Default
  #209
New Member
 
Matteo Carpentieri
Join Date: Mar 2009
Posts: 28
Rep Power: 9
mcarpe is on a distinguished road
Quote:
Originally Posted by 7islands View Post
Matteo,
paraFoam?? Sorry but I'm confused. To clarify, which reader are you talking about (PV3FoamReader or vtkPOpenFOAMReader)? The reader I'm talking about (and am responsible for) is vtkPOpenFOAMReader, which has nothing to do with the paraFoam script.

Takuya

.....OK.... forget it... I posted in the wrong thread.
I'm indeed talking about the PV3FoamReader... I'm sorry if you wasted time after my problem...

I'm going to post it in the right thread.
mcarpe is offline   Reply With Quote

Old   March 1, 2010, 04:42
Default
  #210
Senior Member
 
Mark Olesen
Join Date: Mar 2009
Location: http://olesenm.github.io/
Posts: 784
Rep Power: 19
olesen will become famous soon enough
Quote:
Originally Posted by 7islands View Post
The reader reorders the symmTensor components so that the order matches with the order shown in the selection combo box of the ParaView GUI.
Hi Takuya,

Apart from using inspection of the paraview GUI, is there any documentation about how 6-component data are interpreted? Presumably the component ordering should be VTK and not paraview-specific. The only thing I've seen in VTK is vtkTensor which seems to be 9-component, but haven't seen anything about the interpretation of generic n-Tuple datasets.
Is this a new fix in your reader or did something change in VTK? I noticed that the corresponding code is conditionally enabled:
Code:
#if vtksys_DATE_STAMP_FULL >= 20080620
/mark
olesen is offline   Reply With Quote

Old   March 1, 2010, 06:47
Default
  #211
Super Moderator
 
Takuya OSHIMA
Join Date: Mar 2009
Location: Niigata City, Japan
Posts: 518
Blog Entries: 1
Rep Power: 12
7islands is on a distinguished road
Hi Mark,
No, I am not aware of any concrete documentation about this. The date stamp in the reader source code corresponds to a change to ParaView3/Qt/Core/pqScalarBarRepresentation.cxx, where the component labels are hard-coded.
----------------------------
revision 1.7
date: 2008-06-27 21:30:35 +0900; author: utkarsh; state: Exp; lines: +26 -10;
commitid: PAb32eXp878ziA8t;
ENH: Fixed BUG #5979. 6 component vectors are now labelled as
[XX, YY, ZZ, XY, XZ, YZ]. The color component chooser as well the calculator use this convention while naming components.
----------------------------
The reason why the date is off a week (20080620 vs. 2008-06-27) has totally slipped out of my memory though - it's 1.5 years ago. Before the change IIRC the components were labelled with numbers (0, 1, ... 5).

If we visit the bug #5979 in the tracker, we find that the component labels were named along with a particular file format (Exodus).

Feel free to reopen the issue at the paraview or vtk-developers list if you'd like

Takuya
7islands is offline   Reply With Quote

Old   March 1, 2010, 09:18
Default
  #212
Senior Member
 
Mark Olesen
Join Date: Mar 2009
Location: http://olesenm.github.io/
Posts: 784
Rep Power: 19
olesen will become famous soon enough
Quote:
Originally Posted by 7islands View Post
No, I am not aware of any concrete documentation about this. The date stamp in the reader source code corresponds to a change to ParaView3/Qt/Core/pqScalarBarRepresentation.cxx, where the component labels are hard-coded.
...
ENH: Fixed BUG #5979. 6 component vectors are now labelled as
[XX, YY, ZZ, XY, XZ, YZ]. The color component chooser as well the calculator use this convention while naming components.
Hi Takuya,

Thanks for the info. It's too bad that it is otherwise a bit difficult to find in paraview/vtk.
For a micro-optimization of your reader code, you can reduce the number of operations a little:
Code:
// swap the components of symmTensor to match the component names in paraview
// OpenFOAM: XX, XY, XZ, YY, YZ, ZZ
// ParaView: { "XX", "YY", "ZZ", "XY", "YZ", "XZ" }
if (nComponents == 6)
{
    vtkstd::swap(tuple[1], tuple[3]);
    vtkstd::swap(tuple[2], tuple[5]);
}
BTW: now that your reader is in the standard VTK repo, have you thought again about dropping the old ListTimeStepsByControlDict functionality? I don't know where it would ever be better than the discovery by directory method.
olesen is offline   Reply With Quote

Old   May 28, 2010, 07:26
Default
  #213
Super Moderator
 
Takuya OSHIMA
Join Date: Mar 2009
Location: Niigata City, Japan
Posts: 518
Blog Entries: 1
Rep Power: 12
7islands is on a distinguished road
Hi,
Just wanted to drop notes about the current status of the reader.
  1. ParaView 3.8, which includes a version of the reader, has just been released and is available for download from the ParaView website. The specifics of the reader is summarized in post #190 of this thread.
  2. A talented guy at Kitware recently added experimental native support for polyhedral cells (vtkPolyhedron) to the Git heads of ParaView and VTK. Also, the reader in the Git heads already has support for the new cell type (which is my contribution). You can play with the feature by unchecking the "Decompose Polyhedra" at the bottom of the reader panel: uncheckDecompsePolyhedra.png. Keep in mind that it is still an experimental feature. There are indeed many filters that do not work with this new cell type, particularly those that use cell locator, e.g. Stream Tracer, Plot over Line. Still yet it is cool - below is a screenshot of the iglooWithFridges tutorial case clipped with Extract Cells By Region. I hope it is good enough to demonstrate how cool the new feature is
    vtkPolyhedronVSDecomposition.png (vtkPolyhedron: the new feature, Decomposed polyhedra: what we have long been used to seeing)

Takuya
7islands is offline   Reply With Quote

Old   June 3, 2010, 13:19
Default Paraview-3.8 reading time problem
  #214
Member
 
Pablo Caron
Join Date: Nov 2009
Location: Buenos Aires, Argentina
Posts: 74
Rep Power: 9
pcaron is on a distinguished road
Hi Takuya,

I've used version 173 through pvFoam for a long time. Everything works fine. Thanks for your great jobs, again!

I just installed P-3.8 to test both paraview and the new integrated reader.

I have a case with integer time steps, from 0 to 1100 (for simpleFoam), and after that fractional time steps, 1100 to 1100.5 (for icoFoam). When I used pvFoam (v173) there wasn't any complain. So, I used this case to test the integrated reader in P-3.8.

First I created a dummy file
Code:
touch caseName.foam
Then I open this file with P-3.8 and the folowing issue arises several times
Code:
Warning: In /home/pablo/Programas/ParaView-3.8.0/VTK/IO/vtkOpenFOAMReader.cxx, line 4273
 vtkOpenFOAMReaderPrivate (0x21d2820): Different time directories with the same time value 1100.03 and 1100 found. 1100 will be ignored.
Any idea? Is this the right place to ask or Should I ask at paraview's blogs?

Regards

Pablo
pcaron is offline   Reply With Quote

Old   June 3, 2010, 22:09
Default
  #215
Super Moderator
 
Takuya OSHIMA
Join Date: Mar 2009
Location: Niigata City, Japan
Posts: 518
Blog Entries: 1
Rep Power: 12
7islands is on a distinguished road
Hi Pablo,
Quote:
Code:
Warning: In /home/pablo/Programas/ParaView-3.8.0/VTK/IO/vtkOpenFOAMReader.cxx, line 4273
 vtkOpenFOAMReaderPrivate (0x21d2820): Different time directories with the same time value 1100.03 and 1100 found. 1100 will be ignored.
That is one of the problems whose workaround missed to go into PV 3.8, which also is a variant of the infamous setlocale problem. As a solution, try "export LC_ALL=C" before running ParaView. I personally believe this should ultimately be fixed in ParaView itself so once bugged it at the PV-list, to no avail

Quote:
Is this the right place to ask or Should I ask at paraview's blogs?
Yes, for the moment, this and the PV-list are both the right places.

Takuya
7islands is offline   Reply With Quote

Old   June 3, 2010, 23:16
Default Adding export LC_ALL=C to pvFoam
  #216
Member
 
Pablo Caron
Join Date: Nov 2009
Location: Buenos Aires, Argentina
Posts: 74
Rep Power: 9
pcaron is on a distinguished road
Takuya, maybe I can use the pvFoam script and add this setting there, and pointing to paraview-3.8. Say pvFoam-3.8

I'll modify it tomorrow, at work.

Thank you!

Pablo
pcaron is offline   Reply With Quote

Old   June 4, 2010, 09:58
Default pvFoam-3.8 working!
  #217
Member
 
Pablo Caron
Join Date: Nov 2009
Location: Buenos Aires, Argentina
Posts: 74
Rep Power: 9
pcaron is on a distinguished road
Hi Takuya, everything is working fine now. I added the "export ..." line and changed the paraviewPath to point to the correct paraview in pvFoam. Then I renamed to pvFoam-3.8.

Thanks for your help.

Regards

Pablo
pcaron is offline   Reply With Quote

Old   June 4, 2010, 12:19
Default
  #218
Super Moderator
 
Takuya OSHIMA
Join Date: Mar 2009
Location: Niigata City, Japan
Posts: 518
Blog Entries: 1
Rep Power: 12
7islands is on a distinguished road
Thanks for the report, Pablo.

Coincidentally, another push to the PV developers finally had the fix to the setlocale problem of PV itself go into the Git head of PV 3.9 (just now!)

Takuya

Last edited by 7islands; June 4, 2010 at 12:24. Reason: clarification of the fixed problem
7islands is offline   Reply With Quote

Old   June 4, 2010, 13:30
Default
  #219
Member
 
Pablo Caron
Join Date: Nov 2009
Location: Buenos Aires, Argentina
Posts: 74
Rep Power: 9
pcaron is on a distinguished road
Takuya I want to test pv-3.9 but I can't. If I'm successful I'll implement this at work. So, I prefer to stay in version 3.8 with the workaround. I think it's the safe option.

Regards, and thank you for your help

Pablo
pcaron is offline   Reply With Quote

Old   June 4, 2010, 20:58
Default
  #220
Super Moderator
 
Takuya OSHIMA
Join Date: Mar 2009
Location: Niigata City, Japan
Posts: 518
Blog Entries: 1
Rep Power: 12
7islands is on a distinguished road
That's totally OK - just wanted to let all know.

T
7islands is offline   Reply With Quote

Reply

Thread Tools
Display Modes

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Native VisIt Reader Bugs tj22 OpenFOAM Paraview & paraFoam 8 November 8, 2013 05:21
ParaView Reader %7c Visit tj22 OpenFOAM Paraview & paraFoam 16 September 25, 2008 14:01
OpenFOAM reader in the ParaView CVS tj22 OpenFOAM Paraview & paraFoam 16 December 22, 2007 10:05
Posted OpenFOAM native reader for ParaView3CVS 7islands OpenFOAM Paraview & paraFoam 0 October 24, 2007 10:52
Trying to submit soon Paraview reader tj22 OpenFOAM Paraview & paraFoam 3 June 5, 2006 14:07


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