CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   Open Source Meshers: Gmsh, Netgen, CGNS, ... (http://www.cfd-online.com/Forums/openfoam-meshing-open/)
-   -   create new boundaries in an already defined mesh (http://www.cfd-online.com/Forums/openfoam-meshing-open/99886-create-new-boundaries-already-defined-mesh.html)

jferrari April 14, 2012 13:40

create new boundaries in an already defined mesh
 
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)?

wyldckat April 14, 2012 14:11

Greetings Joe,

You've got at the very least autoPatch and createPatch. I'll quote myself:
Quote:

Originally Posted by wyldckat (Post 345083)
@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 (Post 345327)
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

jferrari April 15, 2012 08:59

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 April 16, 2012 00:24

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?

wyldckat April 16, 2012 04:46

Hi Joe,
Quote:

Originally Posted by jferrari (Post 354812)
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 (Post 354812)
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


All times are GMT -4. The time now is 07:23.