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

Merge boundaries with same name into one single boundary

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 29, 2014, 10:02
Default Merge boundaries with same name into one single boundary
  #1
New Member
 
Join Date: May 2013
Posts: 23
Rep Power: 13
arnaud6 is on a distinguished road
Hello all !

I have been struggling to perform an operation on openfoam and I hope someone can help me to solve it.

Here is the situation
-> I have a fluent .msh file which I convert to openfoam using the fluent3DMeshToFoam utility.
-> Unfortunately, the "boundary" file resulting from this operation contains several boundaries with the same name
-> What I would like is merging them into a single boundary, so that I can run a solver afterthat !

For example, I have in my "boundary" file in /constant/polyMesh

boundary1
{
type wall;
inGroups 1(wall);
nFaces 2;
startFace 237652749;
}
boundary1
{
type wall;
inGroups 1(wall);
nFaces 350265;
startFace 237652751;
}
boundary1
{
type wall;
inGroups 1(wall);
nFaces 7;
startFace 238003016;
}


And I would like to have

------------------->

boundary1
{
type wall;
inGroups 1(wall);
nFaces 350274;
startFace 237652749;
}

Moreover, the best option for me would be to use an automatic process because I don't know a priori which duplicate boundaries are likely to be duplicated.

I precise that I cannot correct my .msh file before the conversion manipulation. So I would like to find a solution once the conversion to openfoam has been realised !
I am looking for a mesh utility to help but I can't find a correct one...

I hope it makes sense. i can add more details if this is not precise enough.

Your help will be much appreciated
arnaud6 is offline   Reply With Quote

Old   December 30, 2014, 12:07
Default
  #2
New Member
 
Join Date: May 2013
Posts: 23
Rep Power: 13
arnaud6 is on a distinguished road
No one has ever had this concern ?

I am thinking that it may be easier and quicker to correct the "boundary" file using a script rather than an openfoam utility.

I will let you know if I make progress on it !
arnaud6 is offline   Reply With Quote

Old   December 31, 2014, 08:44
Default
  #3
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Greetings Arnaud6!

Well, createPatch is what you're looking for... but the problem is that I don't know if OpenFOAM won't look at you funny when you try to use it with such a boundary file, since it's not meant to have more than one boundary with the same exact name

Either way, quoting from here: http://openfoamwiki.net/index.php/In...hing_for_files
Quote:
Code:
find $FOAM_APP -name "*Dict"
In your case:
Code:
find $FOAM_APP $FOAM_TUTORIALS -name "createPatchDict"
And you'll find several example dictionary files that show you various examples on what you can do with this utility

Best regards,
Bruno
__________________
wyldckat is offline   Reply With Quote

Old   January 6, 2015, 12:30
Default
  #4
New Member
 
Join Date: May 2013
Posts: 23
Rep Power: 13
arnaud6 is on a distinguished road
I was thinking ofd createPatch indeed but i have just realised that scripting is sufficient to perform this operation. The drawback with createPatch is that it would nneed first to load the mesh which is time consuming, while performing text operations can be really fast.
arnaud6 is offline   Reply With Quote

Reply

Tags
boundary, duplicate, mesh, utility


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
Foam::error::PrintStack almir OpenFOAM Running, Solving & CFD 92 May 21, 2024 08:56
[ICEM] Unwanted Boundary Merge kozalp ANSYS Meshing & Geometry 4 December 16, 2013 16:53
Inlet and Outlet w/ Single Boundary ericnutsch OpenFOAM 5 January 4, 2010 14:27
Convective Heat Transfer - Heat Exchanger Mark CFX 6 November 15, 2004 16:55
Boundary conditions? Tom Main CFD Forum 0 November 5, 2002 02:54


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