CFD Online Logo CFD Online URL
Home > Forums > Software User Forums > OpenFOAM

MultiRegion heat transfer simulation with SnappyHexMesh and SplitMeshRegion

Register Blogs Members List Search Today's Posts Mark Forums Read

LinkBack Thread Tools Search this Thread Display Modes
Old   February 7, 2021, 10:24
Lightbulb MultiRegion heat transfer simulation with SnappyHexMesh and SplitMeshRegion
New Member
Join Date: Feb 2020
Posts: 9
Rep Power: 4 is on a distinguished road
Hello Foamer!
I'm running a heat exhanger simulation acc. to attachment. (OpenFoam8 is used and please just focus on the geometry first)
I got problem with splitMeshRegions after SnappyHexMesh,
checkMesh showing I have 2 cell zones, (of course it should be, 1 for shell side and 1 for tube side)

Create polyMesh for time = 0

Time = 0

Mesh stats
    points:           1798049
    faces:            5023588
    internal faces:   4998748
    cells:            1612136
    faces per cell:   6.21681
    boundary patches: 6
    point zones:      0
    face zones:       2
    cell zones:       2

Overall number of cells of each type:
    hexahedra:     1501608
    prisms:        3104
    wedges:        0
    pyramids:      0
    tet wedges:    0
    tetrahedra:    0
    polyhedra:     107424
    Breakdown of polyhedra by number of faces:
        faces   number of cells
            4   16
            6   25944
            9   48096
           12   30664
           15   2688
           18   16

Checking topology...
    Boundary definition OK.
    Cell to face addressing OK.
    Point usage OK.
    Upper triangular ordering OK.
    Face vertices OK.
    Number of regions: 1 (OK).

Checking patch topology for multiply connected surfaces...
                   Patch    Faces   Points                  Surface topology
              tube_inlet     3220     3961  ok (non-closed singly connected)
             tube_outlet     3220     3961  ok (non-closed singly connected)
              shell_wall     6960     7092  ok (non-closed singly connected)
            shell_outlet     4240     5098  ok (non-closed singly connected)
             shell_inlet     4241     5099  ok (non-closed singly connected)
          solid_external     2959     4975  ok (non-closed singly connected)

Checking geometry...
    Overall domain bounding box (-0.0349998 -0.0349998 -0.0500066) (0.0349998 0.0349998 0.0500127)
    Mesh has 3 geometric (non-empty/wedge) directions (1 1 1)
    Mesh has 3 solution (non-empty) directions (1 1 1)
    Boundary openness (-1.47295e-16 1.68262e-16 -7.27036e-17) OK.
    Max cell openness = 3.49386e-16 OK.
    Max aspect ratio = 3.64709 OK.
    Minimum face area = 2.9578e-09. Maximum face area = 1.16692e-05.  Face area magnitudes OK.
    Min volume = 1.38181e-11. Max volume = 3.93085e-08.  Total volume = 0.00038209.  Cell volumes OK.
    Mesh non-orthogonality Max: 65.3388 average: 13.9728
    Non-orthogonality check OK.
    Face pyramids OK.
 ***Max skewness = 4.25841, 16 highly skew faces detected which may impair the quality of the results
  <<Writing 16 skew faces to set skewFaces
    Coupled point location match (average 0) OK.

Failed 1 mesh checks.

But I can't run splitMeshRegions -cellZonesOnly -overwrite, program complain all cell have to be in a cellZone.
Using current cellZones to split mesh into regions. This requires all cells to be in one and only one cellZone.
For the cellZonesOnly option all cells have to be in a cellZone.
Cell 39 at(-0.00979483 -0.0232375 -0.049804) is not in a cellZone. There might be more unzoned cells.

    From function int main(int, char**)
    in file splitMeshRegions.C at line 1629.

FOAM exiting
I can run splitMeshRegions -cellZones -overwrite, but then program will give me a lot of region, actually each of the tube will have 1 region, I guess that's because they are not connection from geometry point of view.

Number of regions:15

Writing region per cell file (for manual decomposition) to "constant/cellToRegion"

Writing region per cell as volScalarField to "0/cellToRegion"

Region    Cells
------    -----
0    703121
1    55375
2    55376
3    73376
4    73376
5    76176
6    55616
7    78576
8    53732
9    76176
10    73376
11    55376
12    73376
13    55377
14    53731

Region    Zone    Name
------    ----    ----
0    1    shell
1    -1    region1
2    -1    region2
3    -1    region3
4    -1    region4
5    -1    region5
6    -1    region6
7    0    tube
8    -1    region7
9    -1    region8
10    -1    region9
11    -1    region10
12    -1    region11
13    -1    region12
14    -1    region13
Now the question is, any idea how to fix it? My guess is problem is from "splitMeshRegions" can't recognize the regions not connected, see the tube pic in the attachment I could come up with below ideas,

a) live with it, just continue simulation with all these regions
b) try to connect the tubes, for example make one inlet connect all of them?

c) try to change code of splitMeshRegion to make it go trough a regions which are not connected

(maybe my guess is not correct, so this idea may also lead to wrong direction)

Please, any hints will be very appreciated!

by the way, there seems a similar case been discussed, but I can't see a practical solution...

multiple regions

Attached Images
File Type: png shell.png (77.0 KB, 10 views)
File Type: png shell_to_solid.png (66.3 KB, 9 views)
File Type: png tube And tube_to_solid.png (84.6 KB, 9 views)
Attached Files
File Type: zip (93.3 KB, 0 views)

Last edited by; February 9, 2021 at 21:29. Reason: add more information is offline   Reply With Quote

Old   February 9, 2021, 21:45
Default share one of the solutions
New Member
Join Date: Feb 2020
Posts: 9
Rep Power: 4 is on a distinguished road

Now I found the first solution. - to make tube side connection geometrically, I added a shared inlet.
besides a "fully sealed" model, below 2 points are important,

1. in snappyHexMeshDict, point for locationInMesh should not be in either tube side or shell side, but in the solid wall side. Then you could got two nice meshed region for tube and shell.

2. Run splitMeshRegions -cellZones -defaultRegionName solid -overwrite, besides tube and shell, another region called solid will be generated. Just three of them totally.

Attached Images
File Type: png 2.png (84.8 KB, 10 views)
File Type: png 1.png (32.0 KB, 9 views) is offline   Reply With Quote


heat transfer, multi region, snappyhesmesh, splitmeshregions

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On

All times are GMT -4. The time now is 08:21.