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

How to get the name of a patch

Register Blogs Community New Posts Updated Threads Search

Like Tree3Likes
  • 3 Post By Xabi

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 31, 2009, 07:56
Default How to get the name of a patch
  #1
New Member
 
Join Date: Mar 2009
Posts: 20
Rep Power: 17
Xabi is on a distinguished road
Hi all!

I need to get the name of the patches that are set in the PolyMesh/boundary file.
I have to connect the following pieces of code (wallViscosityI.H)that is the reason why I need a vector with the names of the patches.

Code 1: const fvPatchList& patches = mesh_.boundary();
forAll(patches,patchy) {

const fvPatch& curPatch = patches[patchi];
.
.
.
Code 2: label Patchid=mesh_.boundaryMesh().findPatchID("_______" ).

The vector I need to get should be included inside the brackets.
All advices are wellcome.

Thank you in advance.
Xabi
Xabi is offline   Reply With Quote

Old   March 31, 2009, 08:09
Default I got it
  #2
New Member
 
Join Date: Mar 2009
Posts: 20
Rep Power: 17
Xabi is on a distinguished road
Hi,

I got it:

Code 2: label Patchid=mesh_.boundaryMesh().findPatchID(curPatch. name()).

Thank you anyway.
Nico994396, scleakey and mksajib like this.
Xabi 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
CheckMeshbs errors ivanyao OpenFOAM Running, Solving & CFD 2 March 11, 2009 02:34
[Netgen] Create boundary fabrizio OpenFOAM Meshing & Mesh Conversion 1 October 26, 2008 14:12
Problem with rhoSimpleFoam matteo_gautero OpenFOAM Running, Solving & CFD 0 February 28, 2008 06:51
[Gmsh] Import gmsh msh to Foam adorean OpenFOAM Meshing & Mesh Conversion 24 April 27, 2005 08:19
Multicomponent fluid Andrea CFX 2 October 11, 2004 05:12


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