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

[snappyHexMesh] error with addLayers

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 2, 2024, 10:36
Default error with addLayers
  #1
New Member
 
Marc-Antoine Nadeau
Join Date: Feb 2022
Posts: 5
Rep Power: 4
marc.nadeau97@gmail.com is on a distinguished road
Hello all,

I created a Mesh with snappyHexMesh using castellatedMesh and Snap. Now I want to add a layer around my patch. I keep getting the same error and I can't understand it. If someone could help me out that would be appreciated.


the forum says it doesn't accept my log and snappyHexMeshDict so I've pasted part of it below.


Thank you
marc.nadeau97@gmail.com is offline   Reply With Quote

Old   February 2, 2024, 10:37
Default
  #2
New Member
 
Marc-Antoine Nadeau
Join Date: Feb 2022
Posts: 5
Rep Power: 4
marc.nadeau97@gmail.com is on a distinguished road
error:
Code:
 Checking mesh with layer ...
Checking faces in error :
    non-orthogonality > 65  degrees                        : 0
    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 on cells with determinant < 0.001                : 0
Detected 0 illegal faces (concave, zero area or negative cell pyramid volume)
Extruding 0 out of 45120 faces (0%). Removed extrusion at 0 faces.
Added 0 out of 135360 cells (0%).
Writing 0 added cells to cellSet addedCells

[stack trace]
=============
#1  Foam::sigSegv::sigHandler(int) in /usr/lib/openfoam/openfoam2312/platforms/linux64GccDPInt32Opt/lib/libOpenFOAM.so
#2  ? in /lib/x86_64-linux-gnu/libc.so.6
#3  Foam::snappyLayerDriver::writeLayerSets(Foam::fvMesh const&, Foam::List<int> const&, Foam::Field<double> const&) const in /usr/lib/openfoam/openfoam2312/platforms/linux64GccDPInt32Opt/lib/libsnappyHexMesh.so
#4  Foam::snappyLayerDriver::writeLayerData(Foam::fvMesh const&, Foam::List<int> const&, Foam::List<int> const&, Foam::Field<double> const&, Foam::Field<double> const&) const in /usr/lib/openfoam/openfoam2312/platforms/linux64GccDPInt32Opt/lib/libsnappyHexMesh.so
#5  Foam::snappyLayerDriver::addLayers(Foam::layerParameters const&, Foam::dictionary const&, Foam::List<int> const&, int, Foam::decompositionMethod&, Foam::fvMeshDistribute&) in /usr/lib/openfoam/openfoam2312/platforms/linux64GccDPInt32Opt/lib/libsnappyHexMesh.so
#6  Foam::snappyLayerDriver::doLayers(Foam::dictionary const&, Foam::dictionary const&, Foam::layerParameters const&, Foam::meshRefinement::FaceMergeType, bool, Foam::decompositionMethod&, Foam::fvMeshDistribute&) in /usr/lib/openfoam/openfoam2312/platforms/linux64GccDPInt32Opt/lib/libsnappyHexMesh.so
#7  ? in /usr/lib/openfoam/openfoam2312/platforms/linux64GccDPInt32Opt/bin/snappyHexMesh
#8  ? in /lib/x86_64-linux-gnu/libc.so.6
#9  __libc_start_main in /lib/x86_64-linux-gnu/libc.so.6
#10  ? in /usr/lib/openfoam/openfoam2312/platforms/linux64GccDPInt32Opt/bin/snappyHexMesh
=============
Segmentation fault (core dumped)
SHMdict add layers
Code:
 addLayersControls
{
    // Are the thickness parameters below relative to the undistorted
    // size of the refined cell outside layer (true) or absolute sizes (false).
    relativeSizes true;

    // Per final patch (so not geometry!) the layer information
    layers
    {
        airfoil
        {
            nSurfaceLayers 3;
        }
    }

    // Expansion factor for layer mesh
    expansionRatio 1.1;

    // Wanted thickness of final added cell layer. If multiple layers
    // is the thickness of the layer furthest away from the wall.
    // Relative to undistorted size of cell outside layer.
    // See relativeSizes parameter.
    finalLayerThickness 0.3;

    // Minimum thickness of cell layer. If for any reason layer
    // cannot be above minThickness do not add layer.
    // Relative to undistorted size of cell outside layer.
    minThickness 0.05;

    // If points get not extruded do nGrow layers of connected faces that are
    // also not grown. This helps convergence of the layer addition process
    // close to features.
    // Note: changed(corrected) w.r.t 1.7.x! (didn't do anything in 1.7.x)
    nGrow 0;

    // Advanced settings

    // When not to extrude surface. 0 is flat surface, 90 is when two faces
    // are perpendicular
    featureAngle 180;

    // At non-patched sides allow mesh to slip if extrusion direction makes
    // angle larger than slipFeatureAngle.
    slipFeatureAngle 30;

    // Maximum number of snapping relaxation iterations. Should stop
    // before upon reaching a correct mesh.
    nRelaxIter 5;

    // Number of smoothing iterations of surface normals
    nSmoothSurfaceNormals 10;

    // Number of smoothing iterations of interior mesh movement direction
    nSmoothNormals 5;

    // Smooth layer thickness over surface patches
    nSmoothThickness 10;

    // Stop layer growth on highly warped cells
    maxFaceThicknessRatio 0.5;

    // Reduce layer growth where ratio thickness to medial
    // distance is large
    maxThicknessToMedialRatio 0.3;

    // Angle used to pick up medial axis points
    // Note: changed(corrected) w.r.t 1.7.x! 90 degrees corresponds to 130
    // in 1.7.x.
    minMedialAxisAngle 90;


    // Create buffer region for new layer terminations
    nBufferCellsNoExtrude 0;


    // Overall max number of layer addition iterations. The mesher will exit
    // if it reaches this number of iterations; possibly with an illegal
    // mesh.
    nLayerIter 50;
 }
marc.nadeau97@gmail.com is offline   Reply With Quote

Old   February 3, 2024, 03:26
Default
  #3
Senior Member
 
M
Join Date: Dec 2017
Posts: 642
Rep Power: 12
AtoHM is on a distinguished road
Unfortunately no helpful error and your sHMD appears fine to me. Can you look for a tutorial case with layer generation and verify it works there? What OF version are you using?
AtoHM is offline   Reply With Quote

Old   February 3, 2024, 13:24
Default
  #4
Member
 
Tuomo Keskitalo
Join Date: Oct 2010
Posts: 52
Rep Power: 15
tkeskita is on a distinguished road
Quote:
Originally Posted by marc.nadeau97@gmail.com View Post
error:
Code:
Added 0 out of 135360 cells (0%).
Writing 0 added cells to cellSet addedCells

[stack trace]
=============
#1  Foam::sigSegv::sigHandler(int) in /usr/lib/openfoam/openfoam2312/platforms/linux64GccDPInt32Opt/lib/libOpenFOAM.so
#2  ? in /lib/x86_64-linux-gnu/libc.so.6
#3  Foam::snappyLayerDriver::writeLayerSets(Foam::fvMesh const&, Foam::List<int> const&, Foam::Field<double> const&) const in /usr/lib/openfoam/openfoam2312/platforms/linux64GccDPInt32Opt/lib/libsnappyHexMesh.so
#4  Foam::snappyLayerDriver::writeLayerData(Foam::fvMesh const&, Foam::List<int> const&, Foam::List<int> const&, Foam::Field<double> const&, Foam::Field<double> const&) const in /usr/lib/openfoam/openfoam2312/platforms/linux64GccDPInt32Opt/lib/libsnappyHexMesh.so
This crash happens when Snappy is unable to add any layer cells and tries to write zero cells to a set. You probably need to use relaxed values for mesh quality criteria to allow lower quality cells for layer addition phase to get some layer coverage.
tkeskita is offline   Reply With Quote

Old   February 3, 2024, 14:25
Default
  #5
New Member
 
Marc-Antoine Nadeau
Join Date: Feb 2022
Posts: 5
Rep Power: 4
marc.nadeau97@gmail.com is on a distinguished road
Thank you all for your answer,

I figured it out when I use a higher layer thickness. I didn't think about using relaxed value for the mesh quality.
marc.nadeau97@gmail.com is offline   Reply With Quote

Reply


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
Openfoam 10 tutorial Propeller : error with addLayers true KevinC OpenFOAM Running, Solving & CFD 0 April 6, 2023 06:46
[snappyHexMesh] How to identify faces not extruded after addLayers' snappyHexMesh step? Raphael_Santos OpenFOAM Meshing & Mesh Conversion 8 September 21, 2021 05:00
[snappyHexMesh] Difficulty With AddLayers Not Covering Ship Snayer OpenFOAM Meshing & Mesh Conversion 0 January 12, 2021 23:03
How necessary is the addLayers step on SHM? pela145 OpenFOAM Pre-Processing 0 January 22, 2016 09:19
[snappyHexMesh] Mesh becoming coarser during addLayers in sHM Arnoldinho OpenFOAM Meshing & Mesh Conversion 4 April 6, 2011 12:20


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