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

Finding neighbouring cells when looping over faces in faceSet

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 13, 2007, 05:10
Default Hi, I have a faceSet defini
  #1
Member
 
Ola Widlund
Join Date: Mar 2009
Location: Sweden
Posts: 87
Rep Power: 17
olwi is on a distinguished road
Hi,

I have a faceSet defining an internal interface between two media. I need to set source terms in the neighbouring cells on either side of the interface.

Looping over the faceSet, how do I find cell labels of the "neighbor" and "owner" cells on either side of a face with a given face label?

Thanks in advance,

Ola
olwi is offline   Reply With Quote

Old   December 13, 2007, 06:42
Default Easy: mesh.owner() and mesh
  #2
Senior Member
 
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,905
Rep Power: 33
hjasak will become famous soon enough
Easy:

mesh.owner()[faceIndex] and mesh.neighbour()[faceIndex]

Enjoy,

Hrv
__________________
Hrvoje Jasak
Providing commercial FOAM/OpenFOAM and CFD Consulting: http://wikki.co.uk
hjasak is offline   Reply With Quote

Old   December 13, 2007, 08:03
Default Thanks, Hrv! I assumed it w
  #3
Member
 
Ola Widlund
Join Date: Mar 2009
Location: Sweden
Posts: 87
Rep Power: 17
olwi is on a distinguished road
Thanks, Hrv!

I assumed it would be easy, but it beats my expectations, as usual.

Interesting stuff brewing in new application...

/Ola
olwi 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
Neighbouring Cells Carlos V. FLUENT 4 February 1, 2007 08:45
The coefficient value for neighbouring cells olivier OpenFOAM Running, Solving & CFD 2 December 18, 2005 18:52
neighbouring cells kaokanya Siemens 1 October 13, 2003 05:21
Looping over faces in a cell Senthil FLUENT 3 April 11, 2002 11:41
Accessing neighbouring cells in UDF Hiranya Nath FLUENT 5 March 22, 2002 23:29


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