# SnappyHexMesh and multi stl geometry

I am quite new in snappyhexmesh and OpenFoam world and I am trying to mesh a multi stl geometry. My geometry is a geometry which is split in 3 different stl files. Globally it is closed, but each single part is not closed. As far as each stl is not closed the feature extract step crashes. How can I solve this problem? Have I to close each stl and automatically snappy will connect them?

• It might be better to ask this type of very specific question on an OpenFOAM message board such as the one on www.cfd-online.com
– BlaB
Mar 6 '18 at 15:40
• 1. Quality of stl files is very important, try to improve it 2. If your cad file is not enough try to using for example gmsh for stl generation 3. I'm always using diffrent high quality stl files for snappy and it usually works May 9 '18 at 0:06

Did you try to merge the three STLs to create one, closed STL. OpenFOAM brings with it a toolsurfaceAdd to join STLs. Apart from the problems you encountered in the feature extraction step, how do you think, the cell removal stage of snappy would cope with a non-closed surface?

Join the STLs as separate solids. So, that you have one resulting STL, with each original STL, being an individual STL solid.

In snappy, you can now specify the refinement level based on these solids, see the regions sub-dictionary.

castellatedMeshControls
{
refinementSurfaces
{
mySTL
{
level (2 2);

regions
{
STL_region01
{
level (3 3);
}

STL_region02
{
level (4 4);
}
}
}
}
}


In the resulting mesh, the STL solids will be individual patches, following the naming scheme: stlName_stlSolid

• Yes. the problem is that I split the stl file because I want a different refinement for the 3 parts. Furthermore it allows me to automatically have the 3 patches that I want without passing through toposet and createpatch. Mar 7 '18 at 9:20