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

how to get number of faces in a cell

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 1 Post By mAlletto
  • 1 Post By mAlletto

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 29, 2018, 02:41
Question how to get number of faces in a cell
  #1
Senior Member
 
krishna kant
Join Date: Feb 2016
Location: Hyderabad, India
Posts: 133
Rep Power: 10
kk415 is on a distinguished road
Hi All

My question is very simple. For a given cell how can I determine the number of faces it is surrounded with. Is it cell.size() ?
kk415 is offline   Reply With Quote

Old   July 2, 2018, 04:11
Default
  #2
Senior Member
 
Michael Alletto
Join Date: Jun 2018
Location: Bremen
Posts: 615
Rep Power: 15
mAlletto will become famous soon enough
cell.nFaces() see, e.g., https://github.com/OpenFOAM/OpenFOAM...es/cell/cell.H
kk415 likes this.
mAlletto is offline   Reply With Quote

Old   July 12, 2018, 02:02
Default
  #3
Senior Member
 
krishna kant
Join Date: Feb 2016
Location: Hyderabad, India
Posts: 133
Rep Power: 10
kk415 is on a distinguished road
Thanks Michael,

can you tell me how to get faceList from a cell. I am struggling in that also.
kk415 is offline   Reply With Quote

Old   July 13, 2018, 02:16
Default
  #4
Senior Member
 
Michael Alletto
Join Date: Jun 2018
Location: Bremen
Posts: 615
Rep Power: 15
mAlletto will become famous soon enough
I think you can get it with const cell & cc = mesh.cells()[celli]; -> since a cell is constructed from a faceList you'll get the faceLabels.

But I'm not sure. Maybe you can try it
kk415 likes this.
mAlletto 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] Layers not growing at all zonda OpenFOAM Meshing & Mesh Conversion 12 June 6, 2020 11:28
[mesh manipulation] Importing Multiple Meshes thomasnwalshiii OpenFOAM Meshing & Mesh Conversion 18 December 19, 2015 18:57
Cluster ID's not contiguous in compute-nodes domain. ??? Shogan FLUENT 1 May 28, 2014 15:03
decomposePar pointfield flying OpenFOAM Running, Solving & CFD 28 December 30, 2013 15:05
[blockMesh] BlockMeshmergePatchPairs hjasak OpenFOAM Meshing & Mesh Conversion 11 August 15, 2008 07:36


All times are GMT -4. The time now is 09:20.