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

Finding neighbouring cells when looping over faces in faceSet

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

Reply
 
LinkBack Thread Tools Display Modes
Old   December 13, 2007, 06:10
Default Hi, I have a faceSet defini
  #1
Member
 
Ola Widlund
Join Date: Mar 2009
Location: Sweden
Posts: 87
Rep Power: 8
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, 07:42
Default Easy: mesh.owner() and mesh
  #2
Senior Member
 
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,763
Rep Power: 21
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, 09:03
Default Thanks, Hrv! I assumed it w
  #3
Member
 
Ola Widlund
Join Date: Mar 2009
Location: Sweden
Posts: 87
Rep Power: 8
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

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
Neighbouring Cells Carlos V. FLUENT 4 February 1, 2007 09:45
The coefficient value for neighbouring cells olivier OpenFOAM Running, Solving & CFD 2 December 18, 2005 19:52
neighbouring cells kaokanya CD-adapco 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 23, 2002 00:29


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