CFD Online Logo CFD Online URL
Home > Forums > OpenFOAM

Getting neighboring patches

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree1Likes
  • 1 Post By jherb

LinkBack Thread Tools Display Modes
Old   July 1, 2016, 12:20
Default Getting neighboring patches
New Member
Bodhi Biswas
Join Date: Jun 2016
Posts: 3
Rep Power: 3
Bodhi B is on a distinguished road
Hello FOAMers,

I'm working on a surface nucleate boiling model for multiple bubbles. In order to determine which wall patch makes contact with which bubble, I'd like to use a sorting algorithm to group the patch faces based on the bubble it makes contact with.

In order to accomplish that, I would like to get the index values of all adjacent wall patch faces for each wall patch face. This is where I am stuck. How can I go about finding the adjacent patch faces of a given patch face?

Any help is greatly appreciated!

Bodhi B is offline   Reply With Quote

Old   July 4, 2016, 08:45
Super Moderator
Tobi's Avatar
Tobias Holzmann
Join Date: Oct 2010
Location: Leoben (Austria)
Posts: 1,829
Blog Entries: 6
Rep Power: 32
Tobi has a spectacular aura aboutTobi has a spectacular aura about
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
Hi Bodhi,

at the moment I only know how you access to the neighbor cells of the face. From the fvPatchField you can get the fvPatch where you have access to the Cn() member function. This returns a vectorField with the cellCenters of the neighbors ... maybe this will help you at the beginning. I checked doxygen but could not find a function that will return the face neighbors (maybe I just did not see it).
Keep foaming,
Tobias Holzmann
Tobi is offline   Reply With Quote

Old   July 4, 2016, 16:04
Senior Member
Joachim Herb
Join Date: Sep 2010
Posts: 421
Rep Power: 12
jherb is on a distinguished road
Perhaps this post might help:

It determines the indices of all cells which have faces on a boundary patch. From the cell index you should be able to get its neighbors. Then you should be able to get the faces of the neighbors so you can check, if they lie on the face and are a neighbor of your starting face.
Tobi likes this.
jherb is offline   Reply With Quote

Old   July 5, 2016, 15:35
New Member
Bodhi Biswas
Join Date: Jun 2016
Posts: 3
Rep Power: 3
Bodhi B is on a distinguished road
Thank you, Tobias and Joachim.
Joachim, I will try the method you posted.
Bodhi B is offline   Reply With Quote


Thread Tools
Display Modes

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Foam::error::PrintStack almir OpenFOAM Running, Solving & CFD 81 July 7, 2017 07:31
fluentMeshToFoam: "fluent patch type shadow not recognised" preibie OpenFOAM Other Meshers: ICEM, Star, Ansys, Pointwise, GridPro, Ansa, ... 28 March 29, 2017 04:56
Possible bug with stitchMesh and cyclics in OpenFoam Jack001 OpenFOAM Pre-Processing 0 May 21, 2016 08:00
Problems setting up case for running with chtMultiRegionFoam (mesh is from Salome) esujby OpenFOAM Pre-Processing 29 January 31, 2016 14:09
Merging edge patches Yosmcer OpenFOAM Native Meshers: blockMesh 11 November 16, 2014 15:51

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