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/)
-   -   [Salome] STL file, Patch addition (https://www.cfd-online.com/Forums/openfoam-meshing/138836-stl-file-patch-addition.html)

mwaqas July 11, 2014 17:39

STL file, Patch addition
 
Hi everyone

I am bigener in CFD. I am using SALOME 7.4 for stl file, which I wanted to use in OpenFoam for snappyHesMesh. I wanted to ask
How can I add different patches in stl file, e.g inlet, outlet and wall for a cylinder. For which later I could apply boundary condition in OpenFoam.
Thank you

cutter October 20, 2014 20:10

Hi,

this is not straight forward, but it's been done many times. I think it's already been answerd in some other threads!

These are the main steps, feel free to ask follow-up questions when necessary. I'm writing this from my memories since I don't have Salome at this computer - you should get the point though.

1. Create your geometry.
2. Extract the surface of the geometry. This can be done by selecting the geometry and running 'Explode -> to type Surface'.
3. Group the newly created surface facets to patch groups (inlet, outlet, walls etc.). This can be done by selecting the parent geometry object, creating a new group (of type surface) and adding all neccessary surface facets. You should now have a set of groups containing the whole surface of your geometry.
4. Export the surface facet groups to ASCII STL. This is done by selecting the groups only and running 'Export - ASCII STL'. Each group will be written to a separate STL file (triangulation of a single facet).
5. You now need to add the group name in the header of each file (line starting with 'solid', for example: first line in INLET.stl needs to read 'solid INLET').
6. Put the contents of all the patch STL files into a single STL file (single file containing the named triangualtions of all surface patches). This can be done with the linux command cat: 'cat *.stl > surface_mesh.stl'. Check the result using paraview or your favourite CAD program.
7. Start the actual meshing workflow.

Steps 5. and 6. can easily be automated using simple shells scripts. If anyone knows a quicker way for the whole process: please let us know!

Good luck and have fun!

Cutter

mwaqas October 21, 2014 06:00

Thank you very much for your detailed reply. Problem is resolved :)


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