CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Programming & Development

Different Cell ID in ParaView

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By mheinz

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 17, 2016, 10:51
Default Different Cell ID in ParaView
  #1
New Member
 
Join Date: Jan 2016
Posts: 19
Rep Power: 10
mheinz is on a distinguished road
Hello.

As the heading suggests, I have a problem when accessing specific Cell IDs in ParaView. I noticed the problem when i wanted to visualize some operations on single cells.

What I do to get the data is simply:

Code:
if (iCell == 14154)
{
    // write data
}
The data is stored in a volScalarField in order to visualize it with paraView. That works, but when I look for the Cell ID where the expected data is plotted, the actual cell with ID "14154" is nowhere near the plotted data. Instead I see the Cell ID "14514". The similarity of the Cell IDs is reproducable when I change the specified Cell ID in the code.

Any ideas?

Kind regards,
Michael
mheinz is offline   Reply With Quote

Old   April 17, 2016, 10:58
Default
  #2
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Quick questions:
  1. What are the exact steps you take before and after you run your solver?
    For example, are you running any of the following applications:
    1. renumberMesh
    2. decomposerPar
    3. reconstructPar
    4. any dynamic mesh solvers
  2. Are you running your solver or custom application in parallel or in serial?
  3. Are you using foamToVTK or paraFoam to retrieve the cell IDs?
  4. What options are you using when you either use foamToVTK or paraFoam?
__________________
wyldckat is offline   Reply With Quote

Old   April 17, 2016, 11:10
Default
  #3
New Member
 
Join Date: Jan 2016
Posts: 19
Rep Power: 10
mheinz is on a distinguished road
Thanks for your quick reply.

  1. blockMesh, a custom utility to calculate initial conditions and a modified version of setfields in order to access different regions (modsetFields -region xxx)
  2. I am running a customized multiregion solver in serial.
  3. paraFoam
  4. paraFoam -region xxx
Something I did not mention before: The strange thing is that I access a group of specific cells via a labelList. The cell of interest is included. When I write those Cell IDs in a file, I do not find the ID that is shown in ParaFoam although it is at the expected location.
mheinz is offline   Reply With Quote

Old   April 17, 2016, 11:17
Default
  #4
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Quick answer: Mmm... then I guess that you didn't turn off cell decomposition or turn on the "VTK polyhedral" option in ParaView.
For more details on what I mean exactly, see this FAQ: http://openfoamwiki.net/index.php/FA...is_in_ParaView
wyldckat is offline   Reply With Quote

Old   April 17, 2016, 11:55
Default
  #5
New Member
 
Join Date: Jan 2016
Posts: 19
Rep Power: 10
mheinz is on a distinguished road
Hm, I looked into that but the results where the same.

I will look a little bit more around if there is a mistake in my code, but I really do not think so. However, I made a picture of my paraFoam visualization. Maybe it helps for further ideas.

What I did in the code is:

Code:
label oneCell = 14514;
if (iCell == oneCell)
{
    intCell[iCell] = iCell;
    // additionally some values are written
}
In paraFoam I then see the written values and at the expected cell the value of iCell for the parameter intCell. But as can be seen in the picture, the actual Cell ID in paraFoam is different.
Attached Images
File Type: png cellID.png (71.5 KB, 54 views)
mheinz is offline   Reply With Quote

Old   April 17, 2016, 15:44
Default
  #6
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Quick note:
Quote:
Cell type "Quad"
that's a face on the surface mesh, not a cell. A cell would be of type Hexahedron or Tetrahedron or something like that.

Looks to me like you loaded the surface mesh as well (the patches)
wyldckat is offline   Reply With Quote

Old   April 17, 2016, 16:47
Default
  #7
New Member
 
Join Date: Jan 2016
Posts: 19
Rep Power: 10
mheinz is on a distinguished road
That 's it... Sometimes i have to doubt myself.

I was blindly following my standad procedure when calling paraFoam that I did not recognize that I only activated the visualization of one patch. Of course, then the Cell IDs do not match. ^^

Thank you for your help!
wyldckat likes this.
mheinz is offline   Reply With Quote

Reply


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


Similar Threads
Thread Thread Starter Forum Replies Last Post
[snappyHexMesh] snappyhexmesh cell splitted ununiform..2D case sharonyue OpenFOAM Meshing & Mesh Conversion 1 April 23, 2013 00:34
paraFoam reader for OpenFOAM 1.6 smart OpenFOAM Installation 13 November 16, 2009 22:41
monitoring cell Jane Siemens 2 March 4, 2004 22:01
cell to cell relation CMB Siemens 1 December 4, 2003 05:05


All times are GMT -4. The time now is 13:47.