CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   ParaView (https://www.cfd-online.com/Forums/paraview/)
-   -   [OpenFOAM] Is This A bug for Paraview 4.1.0 64bit (https://www.cfd-online.com/Forums/paraview/141308-bug-paraview-4-1-0-64bit.html)

yym2014 September 4, 2014 13:32

Is This A bug for Paraview 4.1.0 64bit
 
Hello,

When I practiced vector plot in the OpenFoam lid-driven tutorial, I found there is no colored by velocity in display panel, only have colored by p, Glyphvector, cellNormals and Solid color. my paraview version is 4.4.0 64bit, is there something I have missed or it is a bug in Paraview? Is there anyone having the same problem? Thanks.

GDTech September 5, 2014 09:24

Hi,

Glyphvector contains the data used to draw the glyph. So, if you made your glyph from velocity vector, glyphvector is velocity vector.

Regards,
Laurent.

yym2014 September 5, 2014 11:40

About color by velocity
 
Hello, GDTech,

Thank you for the reply. I think the GlyphVector is same as velocity U in this case.

gravis December 26, 2018 03:20

Similar problem in ParaView 5.6.0
 
Hi,

I have a similar problem in ParaView 5.6.0. For a Glyph, I have not figured out how to color the vectors by velocity magnitude.

I first create a Slice that I can color either by velocity or pressure. When I create a Glyph based on this Slice, the available Coloring options for the Glyph are:
  • Solid Color
  • p
  • vtkCompositeIndex
  • CasePath
  • ctkBlockColors (partial)

Can someone please point out what I am missing here?

BR,
Reine

wyldckat December 27, 2018 11:04

1 Attachment(s)
Quote:

Originally Posted by gravis (Post 720131)
Can someone please point out what I am missing here?

Quick answer: I don't have ParaView 5.6 at hand yet, but my guess is that you haven't checked all of the existing Glyph settings that exist.
In version 5.4 there are options on which scale field to use and if the data is mapped or not...

Here is an example of how to select the U cell data field for the glyphs:
https://www.cfd-online.com/Forums/at...chmentid=67464

Notice under "Active Attributes" the "Vectors" selection of the correct field.

gravis December 27, 2018 11:58

Details on the settings in 5.6
 
4 Attachment(s)
Quote:

Originally Posted by wyldckat (Post 720198)
Quick answer: I don't have ParaView 5.6 at hand yet, but my guess is that you haven't checked all of the existing Glyph settings that exist.
In version 5.4 there are options on which scale field to use and if the data is mapped or not...

Here is an example of how to select the U cell data field for the glyphs:
https://www.cfd-online.com/Forums/at...chmentid=67464

Notice under "Active Attributes" the "Vectors" selection of the correct field.

Thanks for the reply. The settings in 5.6 look a bit different, I will attach a series of screenshots that show all settings for the Glyph.

As in your example, I set "Glyph Type" to "Arrow". For "Orientation Array" I select the U cell (or point) data field. The vector arrows shown are as expected. If I change the "Scale Array" to "U", "p" or "No scale array", the arrows are scaled as expected.

But for "Coloring", only the "p" point data field is available (as well as "Solid Color", "vtkCompositeIndex", "CasePath" and "ctkBlockColors (partial)" as I wrote in my previous post). I can not see any other obvious settings that would affect what data fields are available under "Coloring".

I should also mention that I am running ParaView on MacOS Mojave.

BR,
Reine

wyldckat December 27, 2018 14:33

1 Attachment(s)
Quick answer: Wow... I was not expecting this... I've gotten ParaView 5.6.0 from paraview.org and indeed the vector fields are missing... they were simply filtered out, as well as the "glyphVector" entry that used to be there for Glyphs...

The workaround is to use a Calculator filter in the middle, that calculates the "mag(U)" field as point data:

https://www.cfd-online.com/Forums/at...chmentid=67469

Then since it's then a point data scalar field, the field "Result" as shown above will appear in the "Coloring" options for the Glyph.

If you forget to add the calculator after you've already added the Glyph entry, you can still add the calculator to the slice or any other entry, then right-click on the Glyph entry and choose to "Change Input..."


Given that this is either a potential bug or a feature, you may want to ask about this at the Development sub-forum at ParaView's Discourse server: https://discourse.paraview.org/c/development - because I don't know if this is a ParaView bug/feature or if VTK (the main library ParaView depends on) is to blame here...

gravis December 27, 2018 15:02

Quote:

Originally Posted by wyldckat (Post 720212)
The workaround is to use a Calculator filter in the middle, that calculates the "mag(U)" field as point data:

Nice, big thanks for suggesting this workaround. And thanks for taking the time to check this in 5.6. :)


Quote:

Given that this is either a potential bug or a feature, you may want to ask about this at the Development sub-forum at ParaView's Discourse server: https://discourse.paraview.org/c/development - because I don't know if this is a ParaView bug/feature or if VTK (the main library ParaView depends on) is to blame here...
I will post a question there.

JR22 March 29, 2020 19:53

I am using Paraview 5.8 now and have encountered the issue. Any resolution from them ? The calculate filter is a good patch solution in the meantime.

Gallienus April 17, 2020 16:36

Paraview 5.6.0 64-bit won't display Velocity Vectors
 
I suppose I should call them Glyphs now. Anyhow, running XUbuntu 18.04, 64bit (a LTS) with ParaView 5.6.0. Actually it's ParaFoam but I think the app is pretty much the same thing.

I encountered the error in that Velocity Vectors cannot be colored with Velocity: only with Pressure, [also vtk Composite Index, CasePath, vtk BlockColors, and of course Solid Color]. I can display countours of Velocity so I guess this means the data set is loaded.

Wyldkat provides a workaround to use a Calulator filter in the middle. I've tried this and the Calculator Results still are not displayable. I'll attach a screenshot:

https://flowsimulations.com/images/s..._annotated.jpg

For the Calculator I tried using the U as a Result accoring to the Scalers:
Attrib. type: point data
Result: sqrt(U_X^2+U_Y^2+U_Z^2)

since I really have a 2-D model I also tried
Result: sqrt(U_X^2+U_Y^2)

Neither worked. I also downloaded the ParaView 5.8 but I notice that a user here states that it has the exact same problem so I haven't fooled with it yet.

wascott May 5, 2020 21:13

Vectors are missing in ParaView - by design
 
Interesting thread. A bit of background, then what is happening, then how to solve it.

ParaView has a design philosopy that we will attempt to never do something hidden or under the covers. There are three examples I found in this case. We won't magically convert cells to points, or points to cells. (Not sure what OpenFOAM calls these - Cells are Elements, Points are Nodes.) Another example is we will never create vector magnitudes from vectors. You have to do this manually, or tell ParaView to override default behavior.

I believe that the root cause of the issue is that ParaView wants a point for Glyphs. Further, I believe it isn't passing cells through the Glyph filter, glyphs which are placed at points, not cells. In the cases where you do have the correct data, i.e., point vectors, ParaView doesn't have magnitudes.

Note that one case where ParaView will make the conversion from vectors to magnitudes is when you want to color by a variable.

How do we work around these issues? Let me give you the manual methods, then the shortcut (that hides what is going on.). If you have cells and need points (such as contour filter), run the Cell Data to Point Data filter. Point Data to Cell Data works in reverse. Note that default won't pass through the variables coming into this filter, but there is an option to do so. If you need magnitudes, run the Calculator filter, and mag(vector_name). That is 90% of the cases, you get the idea. Alternatively, there's a setting to turn on automatic conversions. It is Edit/ Settings/ AutoConvert Properties.

Note that the tutorials are online, and much of this is covered. In Paraview, go Help/ Sandia National Labs Tutorials.

I tried voodooing up an example, but couldn't get PV to fail. Anyway, I hope that adds some clarity.

Gallienus May 5, 2020 21:35

Quote:

Originally Posted by wascott (Post 768938)
Interesting thread. A bit of background, then what is happening, then how to solve it.
.

Actually this thread was continued on the Paraview support forum and one of the developers kept making helpful comments and eventually I got it to work, -or at least appear to work!

There are continuing comments by more knowledgeable users following mine and there may be some sort of bug. Here is the link (my name there is Julius Nepos as I tired of Gallienus):

https://discourse.paraview.org/t/vel...?u=juliusnepos


All times are GMT -4. The time now is 06:59.