Patch Names in STL file for snappyHexMesh
Good Day Everyone,
I'm trying my first hand at snappyHexMesh, using a simple cylinder inside a rectangular prism domain. The cylinder is an stl file output from HyperMesh. I've named the component in HyperMesh, but that does not seem to show up in the STL file.
My problem arises when I attempt to run snappyHexMesh using this STL file. When it is to add layers to the geometry it writes out:
No layers to generate ...
Layer mesh : cells(local):720 faces(local):2436 points(local):1029
Cells per refinement level:
Writing mesh to time 14
Written mesh in = 0.01 s.
Layers added in = 0.02 s.
Finished meshing in = 0.19 s.
A patch is added during the process of meshing, as far as I can tell:
Adding patches for surface regions
Added patches in = 0 s
I am using OpenFOAM 1.7.1. I think that I have the correct patch names, but is there a function within OpenFOAM to tell you the names of all the included patches? This would be particularly useful for those contained in the STL file.
My best guess is that I have the incorrect patch name in my snappyHexMeshDict file, but could there be another reason for snappyHexMesh not producing a mesh?
I've attached my snappyHexMeshDict file for reference.
Any ideas or suggestions would be much appreciated.
in your STL File you have to name your boundary's. I am working with Catia and have to generate the boundary's with Salome. Here an example:
In this example you got the whole STL Surface with just one boundary called "solid" if you don 't know how the boundary is called do the follow:
this name you have to use in your sHMD :)
after Meshing you have to make a Slice in paraFoam to make that visible.
Hope it 's helpful
Thanks for the reply.
I tried to name the patch "solid" as you suggested in my sHMD, but even then it wouldn't construct any layers. My STL file is just one part (a cylinder) as well, so it should only be one part (or patch).
My STL file starts as:
facet normal 0.0 0.0 1.0
vertex -6.132972E-03 -5.692454E-03 0.000000E+00
vertex -8.145442E-03 -5.839178E-03 0.000000E+00
vertex -6.511647E-03 -7.611832E-03 0.000000E+00
Any ideas on how the naming should be reproduced in sHMDict would be welcome.
Thanks in advance,
I ll make a sHM + STL file for you - there you 'll see it.
That is very kind of you - thank you!
It seems very odd that the cylinder doesn't show up in my mesh, but perhaps with your example files I'll find out I've been naming a patch incorrectly.
Have a good evening,
here the files :)
hope it 's helpful.
Thank you so much. I've run your files and they work perfectly. I think it's also helped me to identify the root of my own error.
I am trying to simulate a cylinder within a rectangular prism of fluid, so I thought that the blockMesh would create the extents of the domain of fluid, and the cylinder would be a solid within that fluid volume. I'm now thinking that the volume domain must also be specified in the STL file to create the outer edges (inlet, outlet, etc.).
no problem :)
maybe that would be very helpful
check it out - i am working with that discretizer too - but just for generation of mesh.
Sorry guys, but i do have the same problem, instead of a cylinder i have an sphere that doesn't show up after executing 'snapHexMesh' and then 'paraFoam'.
I have checked names of the patches of my STL and of my sHMD, and they seem okey. I think is that my sphere has coordenates outside the boundaries, but I don't know how to check that.
I attach my stl and bMD and sHMD in case you can show me where is the error.
Thanks in advance!
It would seem that your blockMesh has z-coordinates from 0 to 8, but your sphere STL contains negative z-coordinates.
My first suggestion would be to extend the bounds of your blockMesh to much further than they are now. Perhaps try z from -8 to +8 first, and to be even more careful, try y from -7 to +7 and x from from -10 to +15.
If you still don't see the sphere, double check that your locationInMesh point lies outside of the volume the sphere occupies.
Hope this helps,
It worked Kattie!, thanks a lot :)
Now I can see the little icosphere after sHMeshing in paraFoam. But since i didn't remember the solvers from the motorbike case (now I see it executes potentialFoam and simpleFoam). I ran ./Allrun script, and then paraFoam and the icosphere wasn't there!, it blew away hehehe.
Looking for the error there must be sth wrong in my sHMD, because actually in the output of the sHD i see 2 warnings, here ->
And I tried running 'potentialFoam' instead ./Allrun , and it yells at me because it can find /3/p subdirectory.
(Maybe i should post this in a new one)
I created a dummy case for testing the naming convention in different file formats and fortunately OpenFOAM can process OBJ files with named faces. I would like to specify a layer where snappyHexMesh should add some prescribed number of layers. Everything works fine when I define a boundary from the blockMesh, but OpenFOAM gives an error with surfaces in sHM geometry list. Tested with OBJ and STL as well.
There's some information about the issue in the official documentation - 5.4.1 The mesh generation process of snappyHexMesh. I didn't specify any patch name but the result is the same with "objFile.obj_pathcName".
|All times are GMT -4. The time now is 23:31.|