Naming patches for snappyHexMesh
Hello, I'm a beginner to sHM and I would like to know if there is any way to name patches without having multiple stl files. I only have one stl file for my geometry and now I can't run an analysis until I name the patches. I would appreciate the help. Thanks!
|
Depending on your CAD software, you have to save the stl file with patch names. Most of the CAD softwares export with the same name for every patches (which is not good for you, since you lose all patch names). In this case if you export every patch into a different stl file, you can merge them with a little modification.
But why do you want only one stl file? Doesn't matter if you have 1 or 10 files, you will just have a bit less lines in your shmDict, but not so much. And also if you have multiple stl files, and you have to modify the geometry, it's enough if you just export the modified patches. Just make sure your surface is closed or shm will fail. |
Thanks simrego! But I currently have only one stl file which was provided to me. Anyway I can make do with this?
|
You can modify the STL files with meslab or salome or many other softwares.
Or you can just run shm with the single stl file, and with topoSet and createPatch utilities you can create patches. |
I know this thread is old, but for anyone else wondering, you can auto patch the stl file in OpenFoam:
Quote:
Quote:
hope this help |
Hello. I am starting to use openfoam, and I am trying to use SnappyHexMesh to mesh a T junction. I am using Solidworks to create the geometry and then export it as STL. The problem is that the surfaceAutoPatch command is not being recognized. I have already executed the autoPatch command but it patches the block mesh and not the stl. I don't know if surfaceAutoPatch command is not available on the openfoam version I am using. Do I really need to use surfaceAutoPatch or can I patch the stl with autoPatch command?
I am using openfoam 2306. |
Quote:
As far as I know surfaceAutoPatch works for OpenFOAMv11 (and other previous versions) from the OpenFOAM Foundation (openfoam.org). The version you're quoting belongs to ESI-OpenCFD (openfoam.com). These 2 codes are similar but also very different in many regards. Looking at the source code for openFOAM 2306 from openfoam.com (https://develop.openfoam.com/Develop...lities/surface) there is a utility called "surfacePatch", you might wanna try that one (I have limited experience with openFOAM from openfoam.com) Now, if you go to the source code for OpenFOAMv11 (from openfoam.org) (https://github.com/OpenFOAM/OpenFOAM...lities/surface) the utility surfaceAutoPatch exists and it's described on the source file. Hope this helps. |
Hi John.
When I posted that question I was starting to explore OpenFoam. Since then, I haven't had much time to come back to it. I work every day with Ansys Fluent but I think OpenFoam is a very interesting platform. As soon as I find some time, I will come back to it. Anyway, appreciate your response. I will analyze it and then I'll let you know if I found the solution. Thanks! |
All times are GMT -4. The time now is 00:58. |