CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM Pre-Processing (
-   -   snappyHexMesh and renaming boundary patches (

amir.a.aliabadi March 17, 2013 20:27

snappyHexMesh and renaming boundary patches
Hello Dear FOAMers,

An interesting problem has occurred to me. I generate a geometry assigned with boundary group (patch) names using Salome 650. I then output the STL file and setup a case to run snappyHexMesh for mesh generation. I enclose my geometry in a simple block mesh and then successfully generate and refine the mesh. The problem, however, is that my boundary patches (example window, top, bottom, etc...) are lost as part of this process, so that none of the original patch names appear in constant/polyMesh/boundary.

Do STL files inherently not carry boundary patch names forward? or the problem is somewhere else? How do you keep the boundary patch names when you run snappyHexMesh?

Thank You!

anon_e June 4, 2013 10:15

I do have the same problem, concerning just a simple pipe geometry. my inlet, outket and wall are lost. At the end the solver can not run...

cutter June 4, 2013 11:35

As far as I know the STL file format is handled differently by various mesh tools. Most of them create and read just one solid (a single set of triangles without any metadata like patch names etc.). On the other hand some tools accept multiple solid sections within a single STL file.

So here's what I did:
- create the model in Salome and assign groups
- export all groups/parts/patches separately (select all relevant groups in the tree view) to STL ASCII format
- add patch name in each file (first line, right after the keyword 'solid')
- concatenate all STL files using

cat patch1.stl patch2.stl ... > final.stl
Any comments and improvements welcome!


amir.a.aliabadi June 4, 2013 11:43

Hello Cutter,
This is a nice approach, and thanks for letting know.
Amir Abbas Aliabadi

anon_e June 5, 2013 03:56

Thanks for you reply. I tried to do so, but unfortunately, my boundary file still looks like

type empty;
nFaces 9600;
startFace 187200;

a little empty :-) I need to specify Inlet, Outlet etc for further processing. I would like to simulate fluid flow through the pipe.

cutter June 5, 2013 04:27

We're no fortune tellers. ;-) Could you please provide some more information, preferably a minimal working example?!


anon_e June 5, 2013 04:42

If you where fortune tellers, please make wheather better :-))) My problem was actually, that I'm friggin blind. Sorry for circumstances. I did not have a look at time constant file "2" after sHM did run . Here, everything was fine. Thanks for help!

All times are GMT -4. The time now is 15:33.