CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Main CFD Forum (https://www.cfd-online.com/Forums/main/)
-   -   Why does the checkMesh fail after using arc (https://www.cfd-online.com/Forums/main/225166-why-does-checkmesh-fail-after-using-arc.html)

masih.mojarrad March 16, 2020 15:17

Why does the checkMesh fail after using arc
 
Hi all,
I am trying to convert a cubic to cylinder. Before starting using arc in the edges, everything was fine. Then, I tried to curve a side. After implementing blockMesh, I have not got any error but after command "checkMesh", I got an error saying that "failed 1 mesh checks". I checked paraview and everything was exactly what I expected. I also ran a simulation and it seemed that it worked properly. So, I wonder why I got this error and how I can deal with that?
I just found something new which may help. I switched to 2D and the problem was gone. So what can I do to solve this problem in 3D?
Best regards,
Masih

LuckyTran March 16, 2020 17:24

What was the check that did not pass? Check the output of checkMesh. If the check passes, there will be an OK. Among other things, checkMesh looks for things like max cell aspect ratio, orthogonality, skewness, etc. These checks can fail and the mesh can still be valid. Actually, almost all the checks can fail and the mesh can still "look as expected" depending on the user's expectations.

masih.mojarrad March 17, 2020 05:10

Thanks a lot for your reply. I think the check passed. Just to be sure, let me show you the output:


Create time

Create polyMesh for time = 0

Time = 0

Mesh stats
points: 907184
faces: 2612365
internal faces: 2505935
cells: 853050
faces per cell: 6
boundary patches: 1
point zones: 0
face zones: 0
cell zones: 0

Overall number of cells of each type:
hexahedra: 853050
prisms: 0
wedges: 0
pyramids: 0
tet wedges: 0
tetrahedra: 0
polyhedra: 0

Checking topology...
Boundary definition OK.
***Total number of faces on empty patches is not divisible by the number of cells in the mesh. Hence this mesh is not 1D or 2D.
Cell to face addressing OK.
Point usage OK.
Upper triangular ordering OK.
Face vertices OK.
*Number of regions: 3
The mesh has multiple regions which are not connected by any face.
<<Writing region information to "0/cellToRegion"
<<Writing region 0 with 211500 cells to cellSet region0
<<Writing region 1 with 211500 cells to cellSet region1
<<Writing region 2 with 430050 cells to cellSet region2

Checking patch topology for multiply connected surfaces...
Patch Faces Points Surface topology
defaultFaces 106430 106436 ok (closed singly connected)

Checking geometry...
Overall domain bounding box (0 0 0) (11 1.02425 0.8485)
Mesh has 0 geometric (non-empty/wedge) directions (0 0 0)
Mesh has 0 solution (non-empty) directions (0 0 0)
***Number of edges not aligned with or perpendicular to non-empty directions: 410640
<<Writing 226088 points on non-aligned edges to set nonAlignedEdges
Boundary openness (-8.10481989877876e-19 -1.25922383370715e-14 2.32556553464854e-16) OK.
Max cell openness = 3.28098648589246e-16 OK.
Max aspect ratio = -1 OK.
Minimum face area = 3.02749999999951e-05. Maximum face area = 0.00327659574468175. Face area magnitudes OK.
Min volume = 1.41712765957277e-06. Max volume = 2.76181100172144e-05. Total volume = 9.04829154912669. Cell volumes OK.
Mesh non-orthogonality Max: 41.9131329708367 average: 5.61442986760273
Non-orthogonality check OK.
Face pyramids OK.
Max skewness = 1.65565039524076 OK.
Coupled point location match (average 0) OK.

Failed 1 mesh checks.

End



While before I wanted to curve the side, the output had been like:


Create time

Create polyMesh for time = 0

Time = 0

Mesh stats
points: 907184
faces: 2612365
internal faces: 2505935
cells: 853050
faces per cell: 6
boundary patches: 1
point zones: 0
face zones: 0
cell zones: 0

Overall number of cells of each type:
hexahedra: 853050
prisms: 0
wedges: 0
pyramids: 0
tet wedges: 0
tetrahedra: 0
polyhedra: 0

Checking topology...
Boundary definition OK.
***Total number of faces on empty patches is not divisible by the number of cells in the mesh. Hence this mesh is not 1D or 2D.
Cell to face addressing OK.
Point usage OK.
Upper triangular ordering OK.
Face vertices OK.
*Number of regions: 3
The mesh has multiple regions which are not connected by any face.
<<Writing region information to "0/cellToRegion"
<<Writing region 0 with 211500 cells to cellSet region0
<<Writing region 1 with 211500 cells to cellSet region1
<<Writing region 2 with 430050 cells to cellSet region2

Checking patch topology for multiply connected surfaces...
Patch Faces Points Surface topology
defaultFaces 106430 106436 ok (closed singly connected)

Checking geometry...
Overall domain bounding box (0 0 0) (11 0.8485 0.8485)
Mesh has 0 geometric (non-empty/wedge) directions (0 0 0)
Mesh has 0 solution (non-empty) directions (0 0 0)
All edges aligned with or perpendicular to non-empty directions.
Boundary openness (8.80555669309502e-20 3.12084741810656e-15 2.36338470594129e-16) OK.
Max cell openness = 1.78516385030031e-16 OK.
Max aspect ratio = -1 OK.
Minimum face area = 3.02749999999951e-05. Maximum face area = 0.00327659574468175. Face area magnitudes OK.
Min volume = 1.41712765957277e-06. Max volume = 1.71776117021312e-05. Total volume = 7.91947474998802. Cell volumes OK.
Mesh non-orthogonality Max: 0 average: 0
Non-orthogonality check OK.
Face pyramids OK.
Max skewness = 3.03595532552006e-13 OK.
Coupled point location match (average 0) OK.

Mesh OK.

End



So what do you think? Can I keep on my simulation?


Thanks in advance for your time and consideration
Best regards
Masih

LuckyTran March 17, 2020 07:16

The check that failed is:

Quote:

Originally Posted by masih.mojarrad (Post 761839)
***Number of edges not aligned with or perpendicular to non-empty directions: 410640


This one you cannot ignore but is easily fixable. This happens when you have faces (actually edges of faces) that don't belong to anything. And this can easily happen when you forget to assign faces to patches in the blockMeshDict. If you plot your mesh for the cylindrical case in paraview, you'll probably see a group called defaultFaces which will normally be empty because they would normally be assigned to a patch with names like mywalltop, yourinlet, somebodysoutlet, etc.


Go fix your blockMeshDict

masih.mojarrad March 17, 2020 07:59

1 Attachment(s)
Well, I think I had done what you said. First, I tried to curve the top wall which belongs to upperWall in blockMeshDict. There are some default faces in my case because there are some internal faces. So, I do not really understand where this error comes from. I attached the blockMeshDict.

LuckyTran March 17, 2020 10:37

The problem is not your curving arc but your blocks which ends up creating internal patches that are not being automatically removed.


The face vertices of the intersections between your blocks are not identical because you have 1 block intersecting 3 blocks (e.g. Top Box and the 3 middle blocks and Bottom Box and the 3 middle boxes). There are 8 such faces (1 big face on the top box, 1 big face on the bottom box, and the 6 faces that are coincide with them) that ends up creating two groups.


You can either assign all 8 of them to patches and merge them using th mergePatchPairs option at the end of the blockMeshDict or you can split up your top and bottom boxes into 3 smaller boxes the same way you have one the middle box. Then they will be automatically merged by the algorithm.


Once you fix this, both of the mesh checks should pass.


All times are GMT -4. The time now is 19:25.