CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Meshing & Mesh Conversion

[snappyHexMesh] Finished Meshing with illegal Faces.

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 21, 2025, 10:48
Default Finished Meshing with illegal Faces.
  #1
New Member
 
Leonhard
Join Date: Apr 2025
Posts: 1
Rep Power: 0
Leonhard is on a distinguished road
Hello
I was trying to create a Mesh with snappyHexMesh
but i got a error that i have 22336 illegal faces.

Here is the full output:
Code:
Overall mesh bounding box  : (-30 -250 -25) (30 150 25)
Relative tolerance         : 1e-06
Absolute matching distance : 0.000407554

Reading refinement surfaces.
Read refinement surfaces in = 0.02 s

Reading refinement shells.
Refinement level 2 for all cells inside refinementBox
Read refinement shells in = 0 s

Setting refinement level of surface to be consistent with shells.
For geometry MainBodyDone.stl detected 0 uncached triangles out of 1774
Checked shell refinement in = 0.03 s

Reading features.
Read edgeMesh mainBodyDone.eMesh
    points      : 163
    edges       : 163
    boundingBox : (-12.475 -159 -12.475) (12.475 50 12.4709)

Refinement level according to distance to "mainBodyDone.eMesh" (163 points, 163 edges).
    level 3 for all cells within 0 metre.
Read features in = 0.01 s


Determining initial surface intersections
-----------------------------------------

Edge intersection testing:
    Number of edges             : 392000
    Number of edges to retest   : 0
    Number of intersected edges : 0
Edge intersection testing:
    Number of edges             : 392000
    Number of edges to retest   : 392000
    Number of intersected edges : 0
Calculated surface intersections in = 0.62 s

Initial mesh : cells:128000  faces:392000  points:136161
Cells per refinement level:
    0   128000

Adding patches for surface regions
----------------------------------

Patch Type                Region
----- ----                ------
mainBody:

3     wall                mainBody

Added patches in = 0.02 s

Edge intersection testing:
    Number of edges             : 392000
    Number of edges to retest   : 0
    Number of intersected edges : 0
Selecting decompositionMethod none [1]

Refinement phase
----------------

Found point (0 -0.1 0) in cell 62040 on processor 0

Feature refinement iteration 0
------------------------------

Marked for refinement due to explicit features             : 204 cells.
Determined cells to refine in = 1.48 s
Selected for feature refinement : 204 cells (out of 128000)
Edge intersection testing:
    Number of edges             : 397499
    Number of edges to retest   : 9318
    Number of intersected edges : 0
Refined mesh in = 0.38 s
After refinement feature refinement iteration 0 : cells:129428  faces:397499  points:139002
Cells per refinement level:
    0   127796
    1   1632

Feature refinement iteration 1
------------------------------

Marked for refinement due to explicit features             : 407 cells.
Determined cells to refine in = 1.35 s
Selected for feature refinement : 691 cells (out of 129428)
Edge intersection testing:
    Number of edges             : 415133
    Number of edges to retest   : 27839
    Number of intersected edges : 0
Refined mesh in = 0.33 s
After refinement feature refinement iteration 1 : cells:134265  faces:415133  points:147335
Cells per refinement level:
    0   127462
    1   3947
    2   2856

Feature refinement iteration 2
------------------------------

Marked for refinement due to explicit features             : 858 cells.
Determined cells to refine in = 1.41 s
Selected for feature refinement : 1670 cells (out of 134265)
Edge intersection testing:
    Number of edges             : 456620
    Number of edges to retest   : 65743
    Number of intersected edges : 0
Refined mesh in = 0.42 s
After refinement feature refinement iteration 2 : cells:145955  faces:456620  points:166079
Cells per refinement level:
    0   127205
    1   5293
    2   7833
    3   5624

Feature refinement iteration 3
------------------------------

Marked for refinement due to explicit features             : 393 cells.
Determined cells to refine in = 1.56 s
Selected for feature refinement : 600 cells (out of 145955)
Edge intersection testing:
    Number of edges             : 471341
    Number of edges to retest   : 31202
    Number of intersected edges : 0
Refined mesh in = 0.4 s
After refinement feature refinement iteration 3 : cells:150155  faces:471341  points:172599
Cells per refinement level:
    0   127163
    1   5448
    2   8904
    3   8640

Feature refinement iteration 4
------------------------------

Marked for refinement due to explicit features             : 153 cells.
Determined cells to refine in = 1.73 s
Selected for feature refinement : 204 cells (out of 150155)
Edge intersection testing:
    Number of edges             : 476081
    Number of edges to retest   : 13843
    Number of intersected edges : 0
Refined mesh in = 0.38 s
After refinement feature refinement iteration 4 : cells:151583  faces:476081  points:174472
Cells per refinement level:
    0   127154
    1   5478
    2   9087
    3   9864

Feature refinement iteration 5
------------------------------

Marked for refinement due to explicit features             : 49 cells.
Determined cells to refine in = 1.67 s
Selected for feature refinement : 63 cells (out of 151583)
Edge intersection testing:
    Number of edges             : 477494
    Number of edges to retest   : 5074
    Number of intersected edges : 0
Refined mesh in = 0.43 s
After refinement feature refinement iteration 5 : cells:152024  faces:477494  points:174988
Cells per refinement level:
    0   127151
    1   5491
    2   9126
    3   10256

Feature refinement iteration 6
------------------------------

Marked for refinement due to explicit features             : 23 cells.
Determined cells to refine in = 1.59 s
Selected for feature refinement : 29 cells (out of 152024)
Edge intersection testing:
    Number of edges             : 478139
    Number of edges to retest   : 2316
    Number of intersected edges : 0
Refined mesh in = 0.38 s
After refinement feature refinement iteration 6 : cells:152227  faces:478139  points:175219
Cells per refinement level:
    0   127149
    1   5503
    2   9135
    3   10440

Feature refinement iteration 7
------------------------------

Marked for refinement due to explicit features             : 7 cells.
Determined cells to refine in = 1.66 s
Selected for feature refinement : 9 cells (out of 152227)
Edge intersection testing:
    Number of edges             : 478337
    Number of edges to retest   : 783
    Number of intersected edges : 0
Refined mesh in = 0.41 s
After refinement feature refinement iteration 7 : cells:152290  faces:478337  points:175288
Cells per refinement level:
    0   127149
    1   5501
    2   9144
    3   10496

Feature refinement iteration 8
------------------------------

Marked for refinement due to explicit features             : 3 cells.
Determined cells to refine in = 1.55 s
Selected for feature refinement : 3 cells (out of 152290)
Edge intersection testing:
    Number of edges             : 478400
    Number of edges to retest   : 296
    Number of intersected edges : 0
Refined mesh in = 0.39 s
After refinement feature refinement iteration 8 : cells:152311  faces:478400  points:175307
Cells per refinement level:
    0   127149
    1   5501
    2   9141
    3   10520

Feature refinement iteration 9
------------------------------

Marked for refinement due to explicit features             : 0 cells.
Determined cells to refine in = 1.55 s
Selected for feature refinement : 0 cells (out of 152311)
Stopping refining since too few cells selected.


Surface refinement iteration 0
------------------------------

Marked for refinement due to surface intersection          : 0 cells.
Marked for refinement due to curvature/regions             : 0 cells.
Determined cells to refine in = 0.01 s
Selected for refinement : 0 cells (out of 152311)
Stopping refining since too few cells selected.


Removing mesh beyond surface intersections
------------------------------------------

Setting cellZones according to locationsInMesh:
Location : (0 -0.1 0)
    cellZone : none

For cellZone none found point (0 -0.1 0) in global region 0 out of 1 regions.
Keeping all cells containing inside points
Selected for keeping : 152311 cells.
Edge intersection testing:
    Number of edges             : 478400
    Number of edges to retest   : 0
    Number of intersected edges : 0
Setting cellZones according to locationsInMesh:
Location : (0 -0.1 0)
    cellZone : none

For cellZone none found point (0 -0.1 0) in global region 0 out of 1 regions.
Keeping all cells containing inside points
Selected for keeping : 152311 cells.
Edge intersection testing:
    Number of edges             : 478400
    Number of edges to retest   : 0
    Number of intersected edges : 0

Shell refinement iteration 0
----------------------------

Marked for refinement due to distance to explicit features : 0 cells.
Marked for refinement due to refinement shells             : 0 cells.
Determined cells to refine in = 0.76 s
Selected for internal refinement : 25 cells (out of 152311)
Edge intersection testing:
    Number of edges             : 478925
    Number of edges to retest   : 2276
    Number of intersected edges : 0
Refined mesh in = 0.37 s
After refinement shell refinement iteration 0 : cells:152486  faces:478925  points:175482
Cells per refinement level:
    0   127124
    1   5701
    2   9141
    3   10520

Shell refinement iteration 1
----------------------------

Marked for refinement due to distance to explicit features : 0 cells.
Marked for refinement due to refinement shells             : 0 cells.
Determined cells to refine in = 0.03 s
Selected for internal refinement : 0 cells (out of 152486)
Stopping refining since too few cells selected.


Dangling coarse cells refinement iteration 0
--------------------------------------------

Determined cells to refine in = 0.01 s
Selected for refinement : 0 cells (out of 152486)
Stopping refining since too few cells selected.


Dangling coarse cells refinement iteration 0
--------------------------------------------

Determined cells to refine in = 0 s
Selected for refinement : 0 cells (out of 152486)
Stopping refining since too few cells selected.


Refinement transition refinement iteration 0
--------------------------------------------

Determined cells to refine in = 0.01 s
Selected for refinement : 0 cells (out of 152486)
Stopping refining since too few cells selected.


Splitting mesh at surface intersections
---------------------------------------

Introducing baffles for 0 faces that are intersected by the surface.

Setting cellZones according to locationsInMesh:
Location : (0 -0.1 0)
    cellZone : none

For cellZone none found point (0 -0.1 0) in global region 0 out of 1 regions.
Created baffles in = 0.22 s


After introducing baffles : cells:152486  faces:478925  points:175482
Cells per refinement level:
    0   127124
    1   5701
    2   9141
    3   10520

Introducing baffles to block off problem cells
----------------------------------------------

--> FOAM Warning :
    From Foam::labelList Foam::meshRefinement::nearestPatch(const labelList&) const
    in file meshRefinement/meshRefinement.C at line 460
    Did not visit some faces, e.g. face 0 at (29.25 145 -24.375)
Assigning these faces to patch 3
markFacesOnProblemCells : marked 0 additional internal faces to be converted into baffles.
Analyzed problem cells in = 0.27 s


Introducing baffles to delete problem cells.

Created baffles in = 0.04 s


After introducing baffles : cells:152486  faces:478925  points:175482
Cells per refinement level:
    0   127124
    1   5701
    2   9141
    3   10520
Setting cellZones according to locationsInMesh:
Location : (0 -0.1 0)
    cellZone : none

For cellZone none found point (0 -0.1 0) in global region 0 out of 1 regions.

Remove unreachable sections of mesh
-----------------------------------

Split mesh in = 0.08 s


After subsetting : cells:152486  faces:478925  points:175482
Cells per refinement level:
    0   127124
    1   5701
    2   9141
    3   10520

Introducing zones for interfaces
--------------------------------

Setting cellZones according to locationsInMesh:
Location : (0 -0.1 0)
    cellZone : none

For cellZone none found point (0 -0.1 0) in global region 0 out of 1 regions.
Setting faceZones according to neighbouring cellZones:

Edge intersection testing:
    Number of edges             : 478925
    Number of edges to retest   : 0
    Number of intersected edges : 0

Handling cells with snap problems
---------------------------------

Introducing baffles for 0 faces that are intersected by the surface.

Setting cellZones according to locationsInMesh:
Location : (0 -0.1 0)
    cellZone : none

For cellZone none found point (0 -0.1 0) in global region 0 out of 1 regions.
Created baffles in = 0.42 s


After introducing baffles : cells:152486  faces:478925  points:175482
Cells per refinement level:
    0   127124
    1   5701
    2   9141
    3   10520

Introducing baffles to block off problem cells
----------------------------------------------

--> FOAM Warning :
    From Foam::labelList Foam::meshRefinement::nearestPatch(const labelList&) const
    in file meshRefinement/meshRefinement.C at line 460
    Did not visit some faces, e.g. face 0 at (29.25 145 -24.375)
Assigning these faces to patch 3
markFacesOnProblemCells : marked 0 additional internal faces to be converted into baffles.
Analyzed problem cells in = 0.26 s


Introducing baffles to delete problem cells.

Created baffles in = 0.07 s


After introducing baffles : cells:152486  faces:478925  points:175482
Cells per refinement level:
    0   127124
    1   5701
    2   9141
    3   10520
Setting cellZones according to locationsInMesh:
Location : (0 -0.1 0)
    cellZone : none

For cellZone none found point (0 -0.1 0) in global region 0 out of 1 regions.

Remove unreachable sections of mesh
-----------------------------------

Split mesh in = 0.1 s


After subsetting : cells:152486  faces:478925  points:175482
Cells per refinement level:
    0   127124
    1   5701
    2   9141
    3   10520

Merge free-standing baffles
---------------------------

freeStandingBaffles : detected 0 free-standing baffles out of 0

Detected free-standing baffles : 0
Merged free-standing baffles in = 0.01 s


dupNonManifoldPoints : Found : 0 non-manifold points (out of 175482)
Detected unsplittable baffles : 0

Merge refined boundary faces
----------------------------

Merging 0 sets of faces.

No faces merged ...

Merging all points on surface that
- are used by only two boundary faces and
- make an angle with a cosine of more than 0.707107.

No straight edges simplified and no points removed ...
Refined mesh : cells:152486  faces:478925  points:175482
Cells per refinement level:
    0   127124
    1   5701
    2   9141
    3   10520
Writing mesh to time 1
Wrote mesh in = 0.16 s.
Mesh refined in = 21.84 s.
Checking final mesh ...
Checking faces in error :
    non-orthogonality > 65  degrees                        : 22336
    faces with face pyramid volume < 1e-13                 : 0
    faces with face-decomposition tet quality < 1e-15      : 0
    faces with concavity > 80  degrees                     : 0
    faces with skewness > 4   (internal) or 20  (boundary) : 0
    faces with interpolation weights (0..1)  < 0.02        : 0
    faces with volume ratio of neighbour cells < 0.01      : 0
    faces with face twist < 0.02                           : 0
    faces with triangle twist < 0.3                        : 0
    faces on cells with determinant < 0.001                : 0
Finished meshing with 22336 illegal faces (concave, zero area or negative cell pyramid volume)
Finished meshing in = 23.37 s.
End
And thats my dict:
Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  v2012                                 |
|   \\  /    A nd           | Website:  www.openfoam.com                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
	version	 2.0;
	format	 ascii;
	class	 dictionary;
	object	 snappyHexMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

castellatedMesh	true;
snap		true;
addLayers	true;

mergeTolerance 1e-6;

geometry
{
	MainBodyDone.stl
	{
	    type triSurfaceMesh;
	    name mainBody;
	    scale 0.001;
	}

	refinementBox
	{
	    type box;
	    min (-1.0 -1.0 0.0);
	    max (1.0 1.0 1.0);
	}
}

castellatedMeshControls
{
    maxLocalCells 100000;
    maxGlobalCells 2000000;
    minRefinementCells 10;
    maxLoadUnbalance 0.10;
    nCellsBetweenLevels 3;

    features
    (
	{
	    file "mainBodyDone.eMesh";
	    level 6;
	}
    );

    refinementSurfaces
    {
	mainBody
	{
	    level (5 6);
	    patchInfo
	    {
		type wall;
	    }
	}
    }

    resolveFeatureAngle 30;

    refinementRegions
    {
	refinementBox
	{
	    mode	inside;
	    levels	((1E15 4));
	}
    }

    locationInMesh (0 -158 -12.2);

    allowFreeStandingZoneFaces true;
}

snapControls
{
    nSmoothPatch 3;
    tolerance 2.0;
    nSolveIter 30;
    nRelaxIter 5;

    nFeatureSnapIter 10;
    implicitFeatureSnap false;
    explicitFeatureSnap true;
    multiRegionFeatureSnap false;
}

addLayersControls
{
    relativeSizes true;
    layers
    {
	mainBody
	{
	    nSurfaceLayers 3;
	}
    }

    expansionRatio 1.0;
    finalLayerThickness 0.3;
    minThickness 0.1;
    nGrow 0;

    featureAngle 60;
    slipFeatureAngle 30;
    nRelaxIter 3;
    nSmoothSurfaceNormals 1;
    nSmoothNormals 3;
    nSmoothThickness 10;
    maxFaceThicknessRatio 0.5;
    maxThicknessToMedialRatio 0.3;
    minMedialAxisAngle 90;
    nBufferCellsNoExtrude 0;
    nLayerIter 50;
}

meshQualityControls
{
    maxNonOrtho		65;
    maxBoundarySkewness	20;
    maxInternalSkewness	4;
    maxConcave		80;
    minVol		1e-13;
    minTetQuality	1e-15;
    minArea		-1;
    minTwist		0.02;
    minDeterminant	0.001;
    minFaceWeight	0.02;
    minVolRatio		0.01;
    minTriangleTwist	0.3;
    nSmoothScale	4;
    errorReduction	0.75;
}
Could anyone help me in fixing this issue.
Leonhard is offline   Reply With Quote

Reply

Tags
illegalfaces, open foam, snappy hex mesh

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
GenerateVolumeMesh Error - Surface Wrapper Self Interacting (?) AndreP STAR-CCM+ 10 August 2, 2018 08:48
[snappyHexMesh] sHM layer process keeps getting killed MBttR OpenFOAM Meshing & Mesh Conversion 4 August 15, 2016 04:21
[mesh manipulation] Importing Multiple Meshes thomasnwalshiii OpenFOAM Meshing & Mesh Conversion 18 December 19, 2015 19:57
[OpenFOAM.org] OF2.3.1 + OS13.2 - Trying to use the dummy Pstream library aylalisa OpenFOAM Installation 23 June 15, 2015 15:49
[blockMesh] BlockMeshmergePatchPairs hjasak OpenFOAM Meshing & Mesh Conversion 11 August 15, 2008 08:36


All times are GMT -4. The time now is 17:18.