Multi region snappy hex mesh
1 Attachment(s)
Hi everyone!
I have trouble understanding how snappyhexmesh works for multi regions. Attached is a drawing of what I am trying to do. Basically, I am trying to mesh a 3 region mesh. I prepared the domain limits as well as each interface. Something odd is that the mesher refines the mesh at the surfaces .stl, but does not create region. Am I doing something wrong? Currently, my "rock" cellzone for example is "open", in the sense that the interface fluid-rock defines its shape via stl, but to close it, it would need to have the interface rock-ground. Do I have to merge them somehow? Here is my snappy file : Code:
/*--------------------------------*- C++ -*----------------------------------*\ Attachment 99724 https://imgur.com/wcFIPPo |
Hello Boris,
I don't know if I properly understood your issue. Snappy's job will be to mesh your whole domain and define a cellZone for each region. The resulting mesh will contain all the regions (which are still only cellZones at this point). Then you need to use the splitMeshRegions utility to split the mesh into regions and create the interfaces. For instance: Code:
splitMeshRegions -cellZonesOnly -overwrite Yann |
1 Attachment(s)
Quote:
I am trying to do a very simple case, where a cylinder is englobing a cube, and I want to mesh both volumes and have two different zones. The very simple example can be found here : Attachment 99728 Even with this, I can't seem to understand how to create different region, can you see what I am missing? My sHM is as such : Code:
/*--------------------------------*- C++ -*----------------------------------*\ |
Which OpenFOAM version are you using?
|
Quote:
Version 2312. But I think I found the issue! Running the command splitMeshRegions -cellZones -overwrite seems to work |
Alright, glad to know you solved your issue!
In the example your posted before, the fluid cellZone was not properly defined, I think because it was missing a faceZone definition: Code:
fluid Using topoSet to fix the cellZones before running splitMeshRegions might do the trick. There are also some resources here: https://openfoamwiki.net/index.php/S...-region_meshes (but everything might not be up to date) I was asking about the version you are using, because in the OpenCFD branch (openfoam.com), there is another way to define cellZones since OpenFOAM-v1612+. Instead of defining cellZones in the refinementSurfaces section, you can use the locationsInMesh parameter to define a point and a name in each region. So your refinementSurfaces section would be like this: Code:
refinementSurfaces Code:
locationsInMesh You will just need to run splitMeshRegions -cellZones -overwrite afterward to split the mesh into regions meshes. It also allows to easily define layers on the fluid side. (check this post https://www.cfd-online.com/Forums/op...tml#post860711) For other users who might read this thread, please note this feature is not available in the foundation branch (openfoam.org) I hope this will be helpful! Yann |
Quote:
Indeed, I forgot to mention I also fixed the faceZone mistake. Regarding the locationsInMesh, it seems indeed quite a simpler way to do things! That also explains why I saw several methods around on the internet. |
All times are GMT -4. The time now is 19:49. |