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] help to troubleshooting snappy mesh errors (https://www.cfd-online.com/Forums/openfoam-meshing/227768-help-troubleshooting-snappy-mesh-errors.html)

otaolafr June 9, 2020 10:10

help to troubleshooting snappy mesh errors
 
4 Attachment(s)
hello,
I am trying to use snappyHexMesh with a complex geometry,
it has really small volumes, in some parts (see figures attached).
the surface mesh i prepeared with salome from the STEP file.
the background mesh i am creating it with blockMesh function,
my issue is that when doing snappy, it gets a lot of illegal faces in the morphing phase (only faces with face pyramid volume < 1e-13: 30842824 ), so snappy keeps trying to solve this problem and the morphing phase iterations begins, until the morph iteration 10 the illegal faces stay the same, and after, the face with face pyramid volume < 1e-13 begins to decrease, other errors begins to appear .... ( first non-orthogonality > 65 degrees that increas in number until morph 22 then faces with face-decomposition tet quality < 1e-15 and faces with face twist < 0.02 appears). after this i beging getting foam warnings:
Code:

From function static Foam::vectorField Foam::snappySnapDriver::calcNearestSurface(const Foam::meshRefinement&, const scalarField&, const indirectPrimitivePatch&, Foam::pointField&, Foam::vectorField&)
    in file snappyHexMeshDriver/snappySnapDriver.C at line 1638

several times each morph iteration and at the end i finish with:
Code:

    non-orthogonality > 65  degrees                        : 8904
    faces with face pyramid volume < 1e-13                : 30833798
    faces with face-decomposition tet quality < 1e-15      : 41
    faces with concavity > 80  degrees                    : 3
    faces with skewness > 4  (internal) or 20  (boundary) : 1
    faces with interpolation weights (0..1)  < 0.05        : 1
    faces with volume ratio of neighbour cells < 0.01      : 0
    faces with face twist < 0.02                          : 5
    faces on cells with determinant < 0.001                : 4
Finished meshing with 30842757 illegal faces (concave, zero area or negative cell pyramid volume)

I was looking any guideline or troubleshooting to read so i can improve my snappydict or my background mesh, as i have found several tutorials for snappy but where this problem does not show.
I do not know where to beging as there is so much features in snappy, and as it takes some time to run (17000secs) I can not change easyly the parameters and re run it...
I am attaching the blockMeshDict and also the snnapy and the log.snappy if it helps.
i also attach the photos of the surface mesh , how it looks inside, and also the edges i capture from the surfaceFeatureExtract (i can say that it is extracting the correct edges....)

best regards,
franco

Ardali June 9, 2020 22:30

Hi,
Snappy is not a perfect tool for automesh generation.

As you extracted acceptable edges from your surface, I only recommend to play with the global and local number of cells. Decrease the number refinement and see what happens. Try to find a star good coarse mesh and then refine the mesh.
Snappy does not give y plus 1 so do not refine close to the wall to much.
Try too deal with it.
Good luck
Ardalan

otaolafr June 10, 2020 02:05

Quote:

Originally Posted by Ardali (Post 773941)
Hi,
Snappy is not a perfect tool for automesh generation.

As you extracted acceptable edges from your surface, I only recommend to play with the global and local number of cells. Decrease the number refinement and see what happens. Try to find a star good coarse mesh and then refine the mesh.
Snappy does not give y plus 1 so do not refine close to the wall to much.
Try too deal with it.
Good luck
Ardalan

hello Ardalan,
thanks for your advice, yeah I am quiet happy that I can recover the "real" edges with such precision.
global and local numbers of cells is up to the sky already :/ I am at 12 000 000 of cells for the global and 2 000 000 for the locals (but I will give a try!)
decrease the number of refinement? i though that it will be better the higher the number is...
star mesh you refear to the background mesh dont you? it was I was trying to modify now.
Snappy does not give y plus,Snappy is not a perfect tool for automesh generation , please allow me to ask you, what you would recommend? i have several geometries with the same boundaries and the same bounding bock with more or less the same internal dimensions so i thought that if I find the correct parameters for snappy it would be a good option, but I am really open to suggestions :D! I thought about cfMesh but as the development stop it i thought it would not be a good idea... I don't know. any recommendation is appreciated it!
and thanks again for the help :)!
franco

CFDUser29 July 16, 2023 08:04

Hello,
I wonder if you managed in the end to reduce the number of illegal faces because I am facing the same problem, with more than 1M cells.


All times are GMT -4. The time now is 02:35.