CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Community Contributions (https://www.cfd-online.com/Forums/openfoam-community-contributions/)
-   -   [cfMesh] Create baffles with cfMesh (https://www.cfd-online.com/Forums/openfoam-community-contributions/244848-create-baffles-cfmesh.html)

Alczem August 31, 2022 08:58

Create baffles with cfMesh
 
1 Attachment(s)
Hi all,


Since cfMesh is such a nice mesher to use, I have been trying to trick it into creating baffles for a while now, so I could set up a fan simulation, without much success. This is one of the main features I need for my projects. It could also allow for easier multiregion meshing.



So far, I tried several things:


  • compute a mesh as usual but add a surfaceRefinement with a .stl file corresponding to my baffle. But it only refines (as expected) around the surface, and the cells do not snap to the surface itself, so I can't use topoSet after that to create the faceZone needed for the baffles.
  • compute a mesh using a .stl file which includes the internal baffle as well. It does produce a mesh snapped to the baffle (I think), but checkMesh returns the baffle as a patch and not as a faceZone, so I am stuck with an internal patch. I tried to use stitchMesh, mergeMesh, mergeOrSplitBaffles... but without much success since you need a neighbour patch. The best I got was to set its type to empty and create a faceZone using patchToFace in topoSetDict, which does create a facezone. But after createBaffles, the initial patch remains and the baffles contain 0 faces.
  • compute a mesh using a .stl file which includes the internal baffle and a doublon in order to trick OpenFoam into believing that two patches are overlapping so I could use one of its utilities to merge the two patches together and create baffles. But no shot.


I am aware that cfMesh is not programmed to allow faceZones, but seeing it can mesh an internal patch (I could even start a simulation when the patch was set to empty), I want to believe it is possible to use the multiple tools of OpenFoam to convert this patch to a faceZone/baffle/whatever.


Here is a picture of the patch cfMesh creates when the STL already includes it. It looks pretty conformal to me.



Does anyone has an idea to get to the finish line? Thanks for any tip!

mpiecuch March 8, 2023 06:52

Hello

That is exacly what I'm thinking about and trying now. Have you been successful?

Best regards
Mateusz


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