CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   ParaView (https://www.cfd-online.com/Forums/paraview/)
-   -   [General] How to display cell number in paraView (https://www.cfd-online.com/Forums/paraview/103358-how-display-cell-number-paraview.html)

anothr_acc June 18, 2012 10:27

How to display cell number in paraView
 
Hi everyone. I'm quite new to paraView and I'm using it with openFoam. I'd like to display cell numbers so I can pick a reference pressure cell number but try as I might I can't see how!

Can somebody help me please?

Best regards,

Mark.

anothr_acc June 19, 2012 09:15

So, I'll answer my own question. Maybe it will help someone else sometime.

1) Load the mesh.
2) Split the mesh view by clicking on one of the top right buttons next to the graphical window.
3) Set the new frame as being, `spreadsheet view'
4) Change `Attribute' to `cell data'.
5) Change the view from `surface' to `wireframe' to enable cells inside the volume to be viewed.
6) Select an entry in the spreadsheet view. The cell should now be highlighted.
7) Change selected cell with mouse, arrow keys, page up/down etc until the highlighted cell is in a good area. Note the cell number.

The cells start at number zero, as does openFoam so the cell number can be directly copied. As for point and click, it's beyond me so far. Still, this is better than selecting cell zero and hoping for the best!

Good luck all.

Best regards,

Mark.

anothr_acc June 19, 2012 12:49

I'll even go one better: extraction of the cell number at the centre of the domain:

1) Clip the mesh three times, once with a normal in each direction.
2) Zoom into the corner containing the cell of interest.
3) View -> Selection inspector. Create selection. Selection type: Location. Field type: cell. Display style / cell label / visible.
4) Active selection: invert selection.

Cells should now be numbered around the region of interest. Note one down.

5) Active selection: de-invert selection.
6) Change to selection type: IDs. Field type, cell.
7) Delete all entries in the new list and create a new entry. Specify the index value just noted down and composite ID.
8) View original mesh.

Hopefully the cell is now highlighted....

anotherbrownkid July 3, 2014 19:06

But how would i select a particular cell and find out its dimension? I have over a million cells

Jack001 August 15, 2016 16:23

Do any of you know if the cell indexing used by paraview would be the same as that for openFoam? I would have assumed so..

Joshua14 April 4, 2017 09:55

Quote:

Originally Posted by anotherbrownkid (Post 499971)
But how would i select a particular cell and find out its dimension? I have over a million cells

You can use a crinkle slice in the x, y, and z direction. This will narrow it down to one cell.

Joshua

ullal October 12, 2017 15:19

Jack,

Did you find the answer to your question regarding whether openfoam and paraview use the same indexing. This is because i found they disagree

kindle February 13, 2018 09:44

cellID consistency
 
Quote:

Originally Posted by ullal (Post 667664)
Jack,

Did you find the answer to your question regarding whether openfoam and paraview use the same indexing. This is because i found they disagree


As far as I know it is consistent on a patch : You choose a cell on a patch and extract its cellID and then go to the patch and say patch.Cf()[cellID] it will be printing the cell center of the cell you choose with a slight difference because (I think) I used a calculater calculating "Coord" and "Point data to Cell data" to get the coord in paraview.

If you are interested, I have (a nasty but working) utility here to access patch data :
https://github.com/snow-stone/Notebo...llQuantitiesV4

Voulet November 20, 2023 03:27

GenerateGlobalIds filter
 
Hi from the future. Since I spent 30 minutes to find the easiest solution I share my finding here since this post is the first google search occurence :


In 2023 you just have to use the paraview filter GenerateGlobalIds on a just loaded openfoam case and it will show you the id.


All times are GMT -4. The time now is 14:21.