CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Paraview & paraFoam (http://www.cfd-online.com/Forums/openfoam-paraview/)
-   -   visualise vector field (http://www.cfd-online.com/Forums/openfoam-paraview/115058-visualise-vector-field.html)

zaynah04 March 22, 2013 12:12

visualise vector field
 
1 Attachment(s)
dear all,

i have a 3d domain, i slice it and i want to disply the velocity vector field..

below is what i see..
ie onluy the vector where it enters the domain and thats it..
can an1 help me please?

wyldckat March 24, 2013 14:34

Hi zaynah,

A few questions:
  • Are you certain that you have the correct item selected in the pipeline browser, before using the Glyph filter?
  • Are you certain you have got a slice of the 3D domain? Perhaps you've selected a 2nd slice, which has reduced the 2D slice to a "1D" line.
  • Are you certain you've made the slice along the correct axis?
  • What are the configuration values you've used for the Glyph filter?
Best regards,
Bruno

zaynah04 March 25, 2013 08:27

Quote:

Originally Posted by wyldckat (Post 416056)
Hi zaynah,

A few questions:
  • Are you certain that you have the correct item selected in the pipeline browser, before using the Glyph filter?
  • Are you certain you have got a slice of the 3D domain? Perhaps you've selected a 2nd slice, which has reduced the 2D slice to a "1D" line.
  • Are you certain you've made the slice along the correct axis?
  • What are the configuration values you've used for the Glyph filter?
Best regards,
Bruno

yes i selected the right item in pipeline..
yes i have a slice off the 3d domain..i slice it from muy 3d domain,
yeh i have made the slice along right axis.. sometiems i use x axis sometimes along z axis..

for glyph in properties panel of object inspector i use scale mode off

in display i use U and then magnitude

thnaks alot for taking time to reply
zay

wyldckat March 25, 2013 17:25

What about the number of glyphs to be represented?
For reference, the options I was asking about are the ones listed here: http://paraview.org/OnlineHelpCurrent/Glyph.html

JR22 March 26, 2013 00:17

Within the Glyph panel, Check the "Scale Mode", try changing it from "vector" to "off". If for some reason you have vectors of large magnitude at the boundary, they will dominate the display (making smaller arrows/2D Glyphs) look much smaller (possibly dots).

zaynah04 March 26, 2013 00:18

Quote:

Originally Posted by JR22 (Post 416379)
Within the Glyph panel, Check the "Scale Mode", try changing it from "vector" to "off". If for some reason you have vectors of large magnitude at the boundary, they will dominate the display (making smaller arrows/2D Glyphs) look much smaller (possibly dots).


yesh this i had done already.

zaynah04 March 26, 2013 00:52

2 Attachment(s)
Quote:

Originally Posted by wyldckat (Post 416335)
What about the number of glyphs to be represented?
For reference, the options I was asking about are the ones listed here: http://paraview.org/OnlineHelpCurrent/Glyph.html

Dear Wyldcat

thanks again for taking time and reply to me.

i am sending you 2 screenshots
its same thing one with only the glyph seen and one with bith glyph and slice seen.



ps: scale mode =off
set scale factor=1
max no of points=5000
glyph type=2D glyph, arrow

wyldckat March 26, 2013 05:39

Try increasing "max no of points" to 10x more or 100x...

There are a few possible issues that you might be having:
  • Values that are NaN or Inf, which might lead ParaView to have problems.
  • Values could be too small.
  • The glyphs might be showing in the back of the slice.
Any chance you can export the slice to VTK format and then share it here on the forum or Dropbox or similar? It would make it easier to diagnose the problem.

zaynah04 March 26, 2013 08:21

i convert to VTK format ... what must i do now can you please guide me?

zaynah04 March 26, 2013 08:23

Quote:

Originally Posted by wyldckat (Post 416426)
  • Values that are NaN or Inf, which might lead ParaView to have problems.

can you please tell me where i can find NaN or Inf?

also please notice how the entering vector arrow is coloured whereas all remian zero in the domain..:(

zaynah04 March 26, 2013 11:01

i have used another case, this time a 2D case and used glyph attached is the image..
we can see the glyph and the velocity colours..only the glyph are not coloured..

this is the whole trouble.. why is the arrows not geting coloured?

one case i use the colour by u and i choose x..
as i had sent wind along the x axis. and it was 0.7m/s, hence i saw a constant 0.7m/s over the whole doamain..

but it does nto change around the shape etc..

i think somehting is wrong somewhere..:(

wyldckat April 1, 2013 08:06

Hi zaynah,

Without the VTK files to look at the results myself, I'm unable to be of much help.

But for some of the questions you had:
  • You can export to VTK file through the menu entry "File -> Save Data", then choose the export format. But keep in mind that you can only export the selected item in the "Pipeline Browser". So:
    1. Select an item in the "Pipeline Browser".
    2. Go to the menu and click on "File -> Save Data".
    3. Choose to export to VTK (legacy) format.
  • To the see the raw values so you can check if there are any Inf or NaN values, use the "Spreadsheet" view: http://www.paraview.org/Wiki/ParaVie...readsheet_View
Best regards,
Bruno

JR22 April 1, 2013 08:22

I just saw the last reply to this message and remembered that I've had plenty of instances where Paraview just arbitrarily ate a whole section of Glyphs when putting them in a slice. I wonder if you can:

1. Start from a VTK file, which you obtain by using the command foamToVTK in the terminal. It might work from the direct paraFoam file, but I haven't tested this.
2. Create a Plane from the Source menu,
3. Change the X and Y Resolution of the plane to something like 200x100 (x,y). By default, the resolution is 1x1, which is wrong if you are going to do step 4 below.
4. Use the Resample with Dataset filter (the source is the created plane, and the input is your entire dataset) on your main dataset.
5. Place your Glyph filter on the ResampleWithDataset object (which is your mapped surface). Make sure you place the Glyph filter on the ResampleWithDataset that has the cube icon, and not on the ones with the arrow (if you misplace the Glyph filter, it will not work).
6. Make sure that only the ResampleWithDataset object + the Glyphs are visible, as the plane itself will hide the mapped results.

This should give you an evenly distributed mesh with a matrix of points that should allow the glyph filter to hold on to. Let us know as I haven't done this, but would like to know if it works. This is the process I use to map results to arbitrary surfaces in paraview. I used it in the last thread I started. In it, I create sources, resample (map) results, and then integrate with moreless detrimental results:
http://www.cfd-online.com/Forums/ope...tml#post417557

UPDATE: Ok, I put Glyphs on the mapped surface and it does work. See link above, I may have answered my question on that other thread. Zaynah, can you try this?

zaynah04 April 2, 2013 15:12

hii jose

first of all thank you for this superb answer..

i am trying it right now..

i will get back to you on that

thanks again
zaynah

zaynah04 April 2, 2013 15:24







when i do resamble i get this error..:(



ERROR: In /home/opencfd/OpenFOAM/ThirdParty-2.1.x/ParaView-3.12.0/VTK/Filtering/vtkExecutive.cxx, line 756
vtkPVCompositeDataPipeline (0x9b42a30): Algorithm vtkPProbeFilter(0x162e1620) returned failure for request: vtkInformation (0x16481660)
Debug: Off
Modified Time: 172930
Reference Count: 1
Registered Events: (none)
Request: REQUEST_DATA_OBJECT
FROM_OUTPUT_PORT: 0
ALGORITHM_AFTER_FORWARD: 1
FORWARD_DIRECTION: 0


another thing is how you chnage the resolution of x and y?



JR22 April 2, 2013 16:31

1 Attachment(s)
One more thing, I started from a VTK file which I exported using foamToVTK. Check the panel for the Plane, there you will find X and Y resolution. Also, the coordinates in this precise plane should give you what you need I think, since you have wind blowing on the structures in the X direction too. Some arrows don't show because they are behind the plane.

http://www.cfd-online.com/Forums/att...1&d=1364934629

zaynah04 April 4, 2013 03:49

hi

i slice my 3D domain,then i apply glyph on it. then i re sample with data set and I GOT IT...

thanksssssssssss a lot jose
from zay



All times are GMT -4. The time now is 19:29.