CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Meshing & Mesh Conversion (https://www.cfd-online.com/Forums/openfoam-meshing/)
-   -   [snappyHexMesh] Adding layers in multiRegion Case (https://www.cfd-online.com/Forums/openfoam-meshing/237065-adding-layers-multiregion-case.html)

Clau.77 June 28, 2021 16:27

Adding layers in multiRegion Case
 
Hey guys!


I m having trouble adding layers in my multi region case.


The way I tried it:
1. snappyHexMesh with addLayers false
2. Then copy the polyMesh folder of the region where I want layers into the constant folder
3. set addLayers in snappy to true and the other two to false


That works so far, when I open Paraview, I can see the region with the layers. Put when I copy the polyMesh folder back to its constant/region/ position and then take a look at the mesh with all regions, the layers are gone.



So, did I miss a step? Or is there another way to add layers?
When I try to addLayers the "normal" way (without copying the polyMesh folders from one place to another), snappy always tells me that there are no layers to generate...


I m getting really frustrated with this, I would appreciate some tipps :)

Yann June 29, 2021 03:46

Hi Claudia,

If I am not mistaken, you are using OpenFOAM foundation version right?

Maybe have a look at the "mergeFaces" parameter which has been introduced since OpenFOAM-7 : https://github.com/OpenFOAM/OpenFOAM...c2d75980212a63

Foundation and ESI/OpenCFD versions have different ways to deal with layer addition in multiregion cases.
I am more used to OpenCFD version so I never used "mergeFaces" but I think this is worth trying.

Cheers,
Yann

Clau.77 June 29, 2021 07:03

Hey Yann,


thank you for the tipp :)


Yes, i am using OF-8. I looked up the mergeFaces option, but I am not sure how it can help me.


I tried mergeFaces=true on the whole mesh, but there where this no layers to generate.

So I tried again to copy the polyMesh folder from the region to the constant folder, added the layers and the copied everything back to place but the mergeFaces option does not make a difference. So I tried to use splitMeshRegion -cellZonesOnly -overwrite before and after the addLayers step but when I use it after adding the layers I have problems with mssing entries in the nSurfaceLayers file.


Would you suggest a different workflow?
And just out of curriosity, how does it work when using OpenCFD?

Yann June 29, 2021 08:45

Hi Claudia,

Have a look at this tutorial, it seems it uses the mergeFaces parameter : https://github.com/OpenFOAM/OpenFOAM...eHeatExchanger

In OpenCFD versions, there is the "locationsInMesh" parameter used to define the cellZones corresponding to the different regions in your mesh. It automatically creates interfaces while meshing (ie. region1_to_region2) and you can use these interfaces in addLayersControls.

Yann

Clau.77 July 1, 2021 08:40

That tutorial helped a lot, I finally managed to get the layers that I wanted :)


Thank you so much for your help, Yann!


All times are GMT -4. The time now is 07:40.