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] SnappyHexMesh crashes on shell refinement (https://www.cfd-online.com/Forums/openfoam-meshing/252908-snappyhexmesh-crashes-shell-refinement.html)

Ryôzanpaku Tiger November 11, 2023 09:39

SnappyHexMesh crashes on shell refinement
 
Dear all,

I am solving a heat transfer multi-region problem on a flow around a thin plate in a pipe.

For snappyHexMesh, blockMesh 40*80*40 works fine, but when I try to use a finer blockMesh 80*200*80, snappyHexMesh crashes with the following message (here are the last lines of the output):

Code:

Surface refinement iteration 4
------------------------------

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


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

Setting cellZones according to locationsInMesh:
Location : (0.0081 0.0001 0.0049)
    cellZone : fluid
Location : (0.0139 0.0001 0.0001)
    cellZone : pipe
Location : (0.0001 0.0001 0.0001)
    cellZone : plane

For cellZone fluid found point (0.0081 0.0001 0.0049) in global region 2 out of 5 regions.
For cellZone pipe found point (0.0139 0.0001 0.0001) in global region 1 out of 5 regions.
For cellZone plane found point (0.0001 0.0001 0.0001) in global region 3 out of 5 regions.
--> FOAM Warning :
    From void Foam::meshRefinement::nearestFace(const labelUList&, const Foam::bitSet&, Foam::autoPtr<Foam::mapDistribute>&, Foam::labelList&, Foam::label) const
    in file meshRefinement/meshRefinement.C at line 515
    Did not visit some faces, e.g. face 0 at (-0.0195 -0.04975 -0.01975)
Keeping all cells containing inside points
Selected for keeping : 5331639 cells.
Edge intersection testing:
    Number of edges            : 17492259
    Number of edges to retest  : 739197
    Number of intersected edges : 1574622

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 = 32.12 s
Selected for internal refinement : 476207 cells (out of 5331639)
Edge intersection testing:
    Number of edges            : 27470895
    Number of edges to retest  : 20488144
Killed

Here is my snappyHexMesh file:
Code:

/*--------------------------------*- C++ -*----------------------------------*\
| =========                |                                                |
| \\      /  F ield        | OpenFOAM: The Open Source CFD Toolbox          |
|  \\    /  O peration    | Version:  v2306                                |
|  \\  /    A nd          | Website:  www.openfoam.com                      |
|    \\/    M anipulation  |                                                |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version    2.0;
    format      ascii;
    class      dictionary;
    object      snappyHexMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

castellatedMesh true;
snap            true;
addLayers      false;

geometry
{
    pipe.stl  { type triSurfaceMesh; name pipe; }
    inlet.stl  { type triSurfaceMesh; name inlet;  }
    outlet.stl { type triSurfaceMesh; name outlet; }
    plane.stl  { type triSurfaceMesh; name plane;
        regions
        {
            planeBackFace {name planeBackFace;}
            planeBottomFace {name planeBottomFace;}
            planeFrontFace {name planeFrontFace;}
            planeHole1 {name planeHole1;}
            planeHole2 {name planeHole2;}
            planeHole3 {name planeHole3;}
            planeHole4 {name planeHole4;}
            planeHole5 {name planeHole5;}
            planeHole6 {name planeHole6;}
            planetLeftFace {name planeLeftFace;}
            planeRightFace {name planeRightFace;}
            planeTopFace {name planeTopFace;}
        }
    }
}

castellatedMeshControls
{
    maxGlobalCells 15000000;
    maxLocalCells 5000000;
    minRefinementCells 0;
    nCellsBetweenLevels 3;

    features
    (
        { file "pipe.extendedFeatureEdgeMesh";  level 2; }
        { file "plane.extendedFeatureEdgeMesh";  level 2; }
    );

    refinementSurfaces
    {
        pipe  { level (2 2); }
        inlet  { level (2 2); patchInfo { type patch; } }
        outlet { level (2 2); patchInfo { type patch; } }
        plane  { level (2 2); patchInfo { type wall; }
            regions
            {
                planeHole1 { level (4 5); }
                planeHole2 { level (4 5); }
                planeHole3 { level (4 5); }
                planeHole4 { level (4 5); }
                planeHole5 { level (4 5); }
                planeHole6 { level (4 5); }
            }
        }
    }

    resolveFeatureAngle 30;

    refinementRegions { }

    locationsInMesh
    (
        ((0.0081 0.0001 0.0049) fluid )
        ((0.0139 0.0001 0.0001) pipe  )
        ((0.0001 0.0001 0.0001) plane )
    );
    allowFreeStandingZoneFaces false;
}

snapControls
{
    nSmoothPatch 3;
    tolerance 1.0;
    nSolveIter 100;
    nRelaxIter 5;
    nFeatureSnapIter 10;
    implicitFeatureSnap false;
    explicitFeatureSnap true;
    multiRegionFeatureSnap false;
}

addLayersControls
{
    relativeSizes false;

    layers
    {
        reactorInnerWall { nSurfaceLayers 8; }
    }

    expansionRatio 1.2;
    finalLayerThickness 0.001;
    minThickness 0.0005;
    nGrow 0;
    featureAngle 80;
    nRelaxIter 5;
    nSmoothSurfaceNormals 1;
    nSmoothNormals 3;
    nSmoothThickness 10;
    maxFaceThicknessRatio 0.5;
    maxThicknessToMedialRatio 0.3;
    minMedialAxisAngle 90;
    nBufferCellsNoExtrude 0;
    nLayerIter 50;
    nRelaxedIter 20;
}

meshQualityControls
{
    maxNonOrtho 180;
    maxBoundarySkewness 20;
    maxInternalSkewness 4;
    maxConcave 80;
    minFlatness 0.5;
    minVol 1e-13;

    minTetQuality 1e-30;
    minArea -1;

    minTwist 0.02;
    minDeterminant 0.001;
    minFaceWeight 0.02;
    minVolRatio 0.01;
    minTriangleTwist -1;

    nSmoothScale 4;
    errorReduction 0.75;
}

mergeTolerance 1e-6;

// ************************************************************************* //

I would very appreciate if someone could give me a hint on what is the reason for a crash? There is no clear error message in the output.

Thanks!

P.S. I was not sure about opening another trade, I am still solving the same task as in Multi-region mesh: improve mesh on interface fluid-solid, but my current question is different from the question stated there.


All times are GMT -4. The time now is 15:59.