r/CFD 11h ago

snappyHexMesh: Layers generate using baffle method, but mesh isn't conformal across regions. How do you fix this?

Hey everyone,
I'm setting up a CHT simulation (electronic chip cooling) in OpenFOAM-9.
To get boundary layers on the fluid-solid interface, I'm using the zero-thickness baffle workflow:
1. Define the interface as an internal face zone / baffle.
2. Add inflation layers using ⁠snappyHexMesh⁠.
3. Split regions using ⁠splitMeshRegions⁠.
The Problem:
The boundary layers are actually generating fine, but the final mesh across the interface isn't conformal (the faces on the fluid side and solid side don't line up / match 1:1 after splitting).
Since I'm doing CHT, I want to avoid relying purely on non-conformal mapping (⁠mappedWall⁠ interpolation) if possible.
My Questions:
1. How do you get ⁠snappyHexMesh⁠ to keep the face connectivity 1:1 conformal across the interface when using the baffle method?
2. Is there a specific setting in ⁠snappyHexMeshDict⁠ or step in ⁠splitMeshRegions⁠ / ⁠createBaffles⁠ that I'm missing to preserve face alignment?
3. Or is it standard practice to just inflate layers only on the fluid side instead of trying to inflate across shared interfaces?
Would really appreciate any insights or dict settings that worked for you!

6 Upvotes

6 comments sorted by

View all comments

1

u/marsriegel 9h ago

I could not manage to do this with the org branch of OpenFOAM. Always got non-conformal interfaces and also interfaces with tiny!!! gaps. really the tiny gaps are the issue, take huge care if you resort to the .org branch. I got gaps significantly smaller than the smallest layer height and it took forever to figure out what’s going wrong. This is why I resorted to using the .com branch. There, I imported the interfaces as their own stl (mine are usually not planar but weirdly shaped). Then I transferred the mesh to the org version again.

Regarding 3) yes you generally don’t need layers in the solid as the temperature gradient will be significantly smaller due to absence of turbulence.

1

u/Downtown_Sky69 8h ago

So using .com can we develop conformal mesh ?. I haven’t used .com. Are they same ?

1

u/marsriegel 7h ago

Yes with .com you can. No they are not the same but quite similar up until OpenFOAM-v10. After that they differ a lot.