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

Got a question on finding the boundary value with a known boundary face label

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 11, 2011, 16:36
Default Got a question on finding the boundary value with a known boundary face label
  #1
New Member
 
Frank Yu
Join Date: Jun 2011
Location: Toronto, ON
Posts: 15
Rep Power: 15
frankyux is on a distinguished road
Hi all,

Just got a question on finding the boundary value with a known boundary face label, it seems quite straight forward but somehow confused me.

I can do the following to find a boundary face label:

meshSearch ms(mesh());
label faceLabel = ms.findNearestBoundaryFace(X);

and trying to get the corresponding value on the boundary:

"vf.boundaryField()[ ? ][faceLabel]"

Now in the question mark [?], unlike internalField, boundaryField contains more than one patches, thus I will need to know the patch label in front of the face label. One way I can do is just make a loop for all patches and check which is the one the face belongs to, but it seems stupid. I just wondering if there's any simple ways to solve it.

Thanks.

regards
Frank
frankyux is offline   Reply With Quote

Old   September 14, 2011, 15:26
Default
  #2
New Member
 
Frank Yu
Join Date: Jun 2011
Location: Toronto, ON
Posts: 15
Rep Power: 15
frankyux is on a distinguished road
Found something useful, I can use

label patchId=mesh().boundaryMesh().whichPatch(myFaceLab el);

to identify the patch index with given face label.
frankyux 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
Water subcooled boiling Attesz CFX 7 January 5, 2013 04:32
[Netgen] Import netgen mesh to OpenFOAM hsieh OpenFOAM Meshing & Mesh Conversion 32 September 13, 2011 06:50
fluent add additional zones for the mesh file SSL FLUENT 2 January 26, 2008 12:55
[Commercial meshers] Trimmed cell and embedded refinement mesh conversion issues michele OpenFOAM Meshing & Mesh Conversion 2 July 15, 2005 05:15
New topic on same subject - Flow around race car Tudor Miron CFX 15 April 2, 2004 07:18


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