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

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

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

Reply
 
LinkBack Thread Tools Display Modes
Old   September 11, 2011, 15: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: 6
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, 14:26
Default
  #2
New Member
 
Frank Yu
Join Date: Jun 2011
Location: Toronto, ON
Posts: 15
Rep Power: 6
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

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
Water subcooled boiling Attesz CFX 7 January 5, 2013 04:32
Import netgen mesh to OpenFOAM hsieh Open Source Meshers: Gmsh, Netgen, CGNS, ... 32 September 13, 2011 05:50
fluent add additional zones for the mesh file SSL FLUENT 2 January 26, 2008 12:55
Trimmed cell and embedded refinement mesh conversion issues michele OpenFOAM Other Meshers: ICEM, Star, Ansys, Pointwise, GridPro, Ansa, ... 2 July 15, 2005 04:15
New topic on same subject - Flow around race car Tudor Miron CFX 15 April 2, 2004 06:18


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