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

[Gmsh] create new boundaries in an already defined mesh

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 14, 2012, 14:40
Default create new boundaries in an already defined mesh
  #1
Member
 
Joe
Join Date: Dec 2011
Location: Groton, CT
Posts: 69
Rep Power: 14
jferrari is on a distinguished road
Hello all,

I have an openfoam mesh (boundary, neighbor, faces, owner, and points files), but the only defined boundary is "unspecified". A friend of mine gave me this mesh as an example of an O-mesh on an airfoil - he created it in gridgen, something I don't have access to.

I searched gmsh, but from what I read it doesn't seem possible to modify boundaries in existing meshes with gmsh.

What is my best option to accomplish this (modifying the boundaries)?
jferrari is offline   Reply With Quote

Old   April 14, 2012, 15:11
Default
  #2
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
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 Joe,

You've got at the very least autoPatch and createPatch. I'll quote myself:
Quote:
Originally Posted by wyldckat View Post
@Elise: You can with createPatch. You can find several examples by running:
Code:
find $WM_PROJECT_DIR -name createPatchDict
If your geometry has good features (i.e., not trying to create a small patch in a flat surface), you can use autoPatch.
Quote:
Originally Posted by wyldckat View Post
The downside of autoPatch (besides the previously mentioned issue) is that you then have to manually rename every patch on "*/polyMesh/boundary". If the geometry doesn't change, or at least not the order of the patches being found, you can use a "changeDictionaryDict" for renaming patches with a pre-done renaming pattern
Best regards,
Bruno
__________________
wyldckat is offline   Reply With Quote

Old   April 15, 2012, 09:59
Default
  #3
Member
 
Joe
Join Date: Dec 2011
Location: Groton, CT
Posts: 69
Rep Power: 14
jferrari is on a distinguished road
Thanks for the response wyldckat - I'm currently looking up the options you suggested but didn't want too much time passing without posting my thanks.
jferrari is offline   Reply With Quote

Old   April 16, 2012, 01:24
Default
  #4
Member
 
Joe
Join Date: Dec 2011
Location: Groton, CT
Posts: 69
Rep Power: 14
jferrari is on a distinguished road
So after looking into autoPatch and createPatch I have some questions.

For autoPatch it asks to specify an angle, and it will group faces together if adjoining faces have an angle less than that specified. Does this mean if I provide it with an angle of 180 degrees it will group every face together? That's what it appeared to do when I ran the command, it didn't seem to get me anywhere. Is there more information that you can pass to autoPatch to get it to run differently? Or is there a way to calculate what angle to pass to autoPatch in order to get it to make specific patches? The faces approaching the trailing edge of my airfoil will have angles close to 180 degrees between them, but entering 180 degrees will return catch every face there.

createPatch looks for the createPatchDict. Checking on the tutorials, it seems like I should be able to define a geometry as an STL file and reference it in a createPatchDict to get a patch on the airfoil - is this correct?
jferrari is offline   Reply With Quote

Old   April 16, 2012, 05:46
Default
  #5
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
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
Hi Joe,
Quote:
Originally Posted by jferrari View Post
For autoPatch it asks to specify an angle, and it will group faces together if adjoining faces have an angle less than that specified. Does this mean if I provide it with an angle of 180 degrees it will group every face together? That's what it appeared to do when I ran the command, it didn't seem to get me anywhere. Is there more information that you can pass to autoPatch to get it to run differently? Or is there a way to calculate what angle to pass to autoPatch in order to get it to make specific patches? The faces approaching the trailing edge of my airfoil will have angles close to 180 degrees between them, but entering 180 degrees will return catch every face there.
The only manipulation I can think of that you could use with autoPatch would be to pre-select cell zones, but I don't know if it's possible to combine the two capabilities.
The other possibility would be to create a modified version of autoPatch that accepts floating point values, such as "179.93". But still, this doesn't look like the best option.

Quote:
Originally Posted by jferrari View Post
createPatch looks for the createPatchDict. Checking on the tutorials, it seems like I should be able to define a geometry as an STL file and reference it in a createPatchDict to get a patch on the airfoil - is this correct?
I think it works as intended, but it will only select the faces whose centre is on the STL surface.

I think here in the forum there are a few discussions about simulating wings and airfoils in OpenFOAM, so it might be a good idea for you to search for them for more information.

Good luck!
Bruno
__________________
wyldckat 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
Foam::error::PrintStack almir OpenFOAM Running, Solving & CFD 92 May 21, 2024 08:56
[ICEM] Can I define periodic boundaries in an unstructured mesh? Aoki ANSYS Meshing & Geometry 11 September 14, 2018 02:52
Mesh Boundary Assignment Question Wandadars Mesh Generation & Pre-Processing 1 June 13, 2016 18:19
Where's the singularity/mesh flaw? audrich FLUENT 3 August 4, 2009 02:07
fluent add additional zones for the mesh file SSL FLUENT 2 January 26, 2008 12:55


All times are GMT -4. The time now is 14:05.