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. |
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. |
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.... |
But how would i select a particular cell and find out its dimension? I have over a million cells
|
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..
|
Quote:
Joshua |
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 |
cellID consistency
Quote:
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 |
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. |