CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Meshing & Mesh Conversion (https://www.cfd-online.com/Forums/openfoam-meshing/)
-   -   [Gmsh] gmshtoFoam - boundary conditions (https://www.cfd-online.com/Forums/openfoam-meshing/86977-gmshtofoam-boundary-conditions.html)

atareen64 April 7, 2011 15:55

gmshtoFoam - boundary conditions
 
Dear all,

I have a geometry in solidworks that I had to import in openfoam, so here's what I did:

1) I imported the geometry in salome and meshed it.
2) Exported to gmsh in .med format and saved it in .msh format.
3) imported the .msh file in openfoam using 'gmshToFoam'

Now that I have this mesh in OF, I need to apply boundary conditions on my geometry, e.g. inlet, outlet etc, but I need to apply them only on certain boundary faces.

gmshToFoam created just one big patch for me, called patch0, which was basically the entire mesh. So I used 'autoPatch' to break up the mesh into different pieces so I could apply B-C's to my system. Unfortunately, these patches are volumes/3D boxes, so when I apply a BC to a patch, the entire volume has that boundary condition including all the faces.

My question is this: How can I just select one fact inside of these 3D volume patches and apply a boundary condition there?

Please, please help. Any pointers are welcome!

Thanks a lot.
Ammar.

mgdenno April 15, 2011 15:09

I don't know for sure, but you may need to define a Physical Surface.

Check this out:

http://openfoamwiki.net/index.php/2D...ial_using_GMSH

atareen64 April 20, 2011 10:56

Thank you, I made it work. I just had to define groups, it was a little annoying but it works fine.


All times are GMT -4. The time now is 11:35.