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

[snappyHexMesh] snappyHexMesh - distortions over a complex terrain

Register Blogs Community New Posts Updated Threads Search

Like Tree4Likes
  • 3 Post By AtoHM
  • 1 Post By MaySea

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 8, 2020, 09:27
Default snappyHexMesh - distortions over a complex terrain
  #1
Member
 
Jan Majcher
Join Date: Nov 2018
Posts: 39
Rep Power: 8
MaySea is on a distinguished road
Hi,

I've been trying to mesh a complex terrain topography using snappyHexMesh.
Here I attach screengrabs showing the castellated, snapped and layered meshes. As you can see, after snapping, weird triangular anomalies appear between refinement zones. The effect is magnified after adding layers. Could you please have a look and tell me if there's any way to minimize the effect using snappyHexMeshDict controls?

I guess that it will significantly distort the simulation. In fact, I spotted these after trying to simulate - the simulation blew up many times, using various discretization schemes, initial boundary conditions of turbulent quantities etc. I guess the blow ups might have been caused by the mesh.

I smoothed my .stl geometry in sharp places using meshMixer, and checked it there too. Didn't help.

Here I attach the snappyHexMeshDict and logCheckMesh too.

Thanks a lot for any help.

Screengrabs:
https://photos.google.com/share/AF1Q...JjSWV5TmZSa25n


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

// Which of the steps to run
castellatedMesh true;
snap            true;
addLayers       true;


// Geometry. Definition of all surfaces. All surfaces are of class
// searchableSurface.
// Surfaces are used
// - to specify refinement for any mesh cell intersecting it
// - to specify refinement for any mesh cell inside/outside/near
// - to 'snap' the mesh boundary to the surface
geometry
{
    barkley2019.stl
    {
        type triSurfaceMesh;
        name barkley;
    }
	
    refinementBox1
    {
        type searchableBox;
        min (56	-140 -70);
        max (175 -41 -30);
    } 
	
	
    refinementBox2
    {
        type searchableBox;
        min (72	-127 -70);
        max (157 -57 -45);
    } 
	
	
	
};



// Settings for the castellatedMesh generation.
castellatedMeshControls

// ALL SET TO DEFAULT AS IGLOO TUTORIAL IN OPENFOAM 2.1.0

{

    // Refinement parameters
    // ~~~~~~~~~~~~~~~~~~~~~

    // While refining maximum number of cells per processor. This is basically
    // the number of cells that fit on a processor. If you choose this too small
    // it will do just more refinement iterations to obtain a similar mesh.
    maxLocalCells 1500000;//was1000000

    // Overall cell limit (approximately). Refinement will stop immediately
    // upon reaching this number so a refinement level might not complete.
    // Note that this is the number of cells before removing the part which
    // is not 'visible' from the keepPoint. The final number of cells might
    // actually be a lot less.
    maxGlobalCells 3000000; //was2000000

    // The surface refinement loop might spend lots of iterations refining just a
    // few cells. This setting will cause refinement to stop if <= minimumRefine
    // are selected for refinement. Note: it will at least do one iteration
    // (unless the number of cells to refine is 0)
    minRefinementCells 100; 



    // Number of buffer layers between different levels.
    // 1 means normal 2:1 refinement restriction, larger means slower
    // refinement.
    nCellsBetweenLevels 1; 



    // Explicit feature edge refinement
    // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    // Specifies a level for any cell intersected by its edges.
    // This is a featureEdgeMesh, read from constant/triSurface for now.

    features
    (
        {
            file "barkley2019.eMesh";
            level 2;
        }
    );



    // Surface based refinement
    // ~~~~~~~~~~~~~~~~~~~~~~~~

    // Specifies two levels for every surface. The first is the minimum level,
    // every cell intersecting a surface gets refined up to the minimum level.
    // The second level is the maximum level. Cells that 'see' multiple
    // intersections where the intersections make an
    // angle > resolveFeatureAngle get refined up to the maximum level.

    refinementSurfaces
    {
       barkley

        {
            // Surface-wise min and max refinement level
            level (2 2); // 
        }

		 
    }

    // Resolve sharp angles
    resolveFeatureAngle 30; 


    // Region-wise refinement
    // ~~~~~~~~~~~~~~~~~~~~~~

    // Specifies refinement level for cells in relation to a surface. One of
    // three modes
    // - distance. 'levels' specifies per distance to the surface the
    //   wanted refinement level. The distances need to be specified in
    //   descending order.
    // - inside. 'levels' is only one entry and only the level is used. All
    //   cells inside the surface get refined up to the level. The surface
    //   needs to be closed for this to be possible.
    // - outside. Same but cells outside.

    refinementRegions
    {
    	   barkley
         {
            mode distance;
             levels ((2 2)(15 1)); 
         } 
		 

		refinementBox1
        {
             mode inside;
             levels ((1 4)); 
        } 
		
		refinementBox2
        {
             mode inside;
             levels ((1 5)); 
		}	 
    }

    // Mesh selection
    // ~~~~~~~~~~~~~~

    // After refinement patches get added for all refinementSurfaces and
    // all cells intersecting the surfaces get put into these patches. The
    // section reachable from the locationInMesh is kept.

    // NOTE: This point should never be on a face, always inside a cell, even
    // after refinement.
    locationInMesh (100 10 -20);

    // Whether any faceZones (as specified in the refinementSurfaces)
    // are only on the boundary of corresponding cellZones or also allow
    // free-standing zone faces. Not used if there are no faceZones.
    allowFreeStandingZoneFaces true;
                     
}



// Settings for the snapping.
snapControls
{
    //- Number of patch smoothing iterations before finding correspondence
    //  to surface
    nSmoothPatch 3; //was 3

    //- Relative distance for points to be attracted by surface feature point
    //  or edge. True distance is this factor times local
    //  maximum edge length.
    tolerance 1.5; //was 4

    //- Number of mesh displacement relaxation iterations.
    nSolveIter 30; //was 30

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



// Settings for the layer addition.
addLayersControls
{
    relativeSizes true;

    // Per final patch (so not geometry!) the layer information
    layers
    {

        barkley
        {
            nSurfaceLayers 2; 
        }

    }

    // Expansion factor for layer mesh
    expansionRatio 1.5; //was 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.
    finalLayerThickness 0.4;

    //- 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.1;

    //- 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.
    nGrow 0;


    // Advanced settings

    //- When not to extrude surface. 0 is flat surface, 90 is when two faces
    //  make straight angle.
    featureAngle 60; //was 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; //was 20

    // Number of smoothing iterations of interior mesh movement direction
    nSmoothNormals 10; //30 

    // 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
    minMedianAxisAngle 90;

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

    // Overall max number of layer addition iterations
    nLayerIter 50;
}



// Generic mesh quality settings. At any undoable phase these determine
// where to undo.
meshQualityControls
{
    //- Maximum non-orthogonality allowed. Set to 180 to disable.
    maxNonOrtho 55;

    //- Max skewness allowed. Set to <0 to disable.
    maxBoundarySkewness 8; //was 10
    maxInternalSkewness 4;

    //- Max concaveness allowed. Is angle (in degrees) below which concavity
    //  is allowed. 0 is straight face, <0 would be convex face.
    //  Set to 180 to disable.
    maxConcave 40;

    //- Minimum projected area v.s. actual area. Set to -1 to disable.
    minFlatness 0.5;

    //- Minimum pyramid volume. Is absolute volume of cell pyramid.
    //  Set to very negative number (e.g. -1E30) to disable.
    minVol 1e-13;

    //- Minimum quality of the tet formed by the face-centre
    //  and variable base point minimum decomposition triangles and
    //  the cell centre.  Set to very negative number (e.g. -1E30) to
    //  disable.
    //     <0 = inside out tet,
    //      0 = flat tet
    //      1 = regular tet
    minTetQuality 1e-30;

    //- Minimum face area. Set to <0 to disable.
    minArea -1;

    //- Minimum face twist. Set to <-1 to disable. dot product of face normal
    //- and face centre triangles normal
    minTwist 0.05;

    //- minimum normalised cell determinant
    //- 1 = hex, <= 0 = folded or flattened illegal cell
    minDeterminant 0.001;

    //- minFaceWeight (0 -> 0.5)
    minFaceWeight 0.02;

    //- minVolRatio (0 -> 1)
    minVolRatio 0.01;

    //must be >0 for Fluent compatibility
    minTriangleTwist -1;


    // Advanced

    //- Number of error distribution iterations
    nSmoothScale 4;
    //- amount to scale back displacement at error points
    errorReduction 0.75;
}


// Advanced

// Flags for optional output
// 0 : only write final meshes
// 1 : write intermediate meshes
// 2 : write volScalarField with cellLevel for postprocessing
// 4 : write current intersections as .obj files
debug 0;


// Merge tolerance. Is fraction of overall bounding box of initial mesh.
// Note: the write tolerance needs to be higher than this.
mergeTolerance 1E-6;


// ************************************************************************* //
MaySea is offline   Reply With Quote

Old   November 8, 2020, 09:29
Default logCheckMesh
  #2
Member
 
Jan Majcher
Join Date: Nov 2018
Posts: 39
Rep Power: 8
MaySea is on a distinguished road





Code:
/*---------------------------------------------------------------------------*\
  =========                 |
  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
   \\    /   O peration     | Website:  https://openfoam.org
    \\  /    A nd           | Version:  6
     \\/     M anipulation  |
\*---------------------------------------------------------------------------*/
Build  : 6
Exec   : checkMesh -allGeometry -allTopology -writeSets vtk
Date   : Nov 07 2020
Time   : 13:59:34
Host   : "Node-K"
PID    : 15749
I/O    : uncollated
Case   : 
nProcs : 1
sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster (fileModificationSkew 10)
allowSystemOperations : Allowing user-supplied system call operations

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time

Create polyMesh for time = 0

Enabling all (cell, face, edge, point) topology checks.

Enabling all geometry checks.

Reconstructing and writing vtk representation of all faceSets and cellSets.

Time = 0

Mesh stats
    points:           33856
    faces:            94500
    internal faces:   87750
    cells:            30375
    faces per cell:   6
    boundary patches: 6
    point zones:      0
    face zones:       0
    cell zones:       0

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

Checking topology...
    Boundary definition OK.
    Cell to face addressing OK.
    Point usage OK.
    Upper triangular ordering OK.
    Face vertices OK.
    Topological cell zip-up check OK.
    Face-face connectivity OK.
    Number of regions: 1 (OK).

Checking patch topology for multiply connected surfaces...
    Patch               Faces    Points   Surface topology                   Bounding box
    north               675      736      ok (non-closed singly connected)   (3 18 -75) (228 18 0)
    west                675      736      ok (non-closed singly connected)   (3 -207 -75) (3 18 0)
    east                675      736      ok (non-closed singly connected)   (228 -207 -75) (228 18 0)
    south               675      736      ok (non-closed singly connected)   (3 -207 -75) (228 -207 0)
    seabed              2025     2116     ok (non-closed singly connected)   (3 -207 -75) (228 18 -75)
    watersurface        2025     2116     ok (non-closed singly connected)   (3 -207 0) (228 18 0)

Checking geometry...
    Overall domain bounding box (3 -207 -75) (228 18 0)
    Mesh has 3 geometric (non-empty/wedge) directions (1 1 1)
    Mesh has 3 solution (non-empty) directions (1 1 1)
    Boundary openness (0 0 0) OK.
    Max cell openness = 0 OK.
    Max aspect ratio = 1 OK.
    Minimum face area = 25. Maximum face area = 25.  Face area magnitudes OK.
    Min volume = 125. Max volume = 125.  Total volume = 3796875.  Cell volumes OK.
    Mesh non-orthogonality Max: 0 average: 0
    Non-orthogonality check OK.
    Face pyramids OK.
    Max skewness = 0 OK.
    Coupled point location match (average 0) OK.
    Face tets OK.
    Min/max edge length = 5 5 OK.
    All angles in faces OK.
    Face flatness (1 = flat, 0 = butterfly) : min = 1  average = 1
    All face flatness OK.
    Cell determinant (wellposedness) : minimum: 1 average: 7.1385021
    Cell determinant check OK.
    Concave cell check OK.
    Face interpolation weight : minimum: 0.5 average: 0.5
    Face interpolation weight check OK.
    Face volume ratio : minimum: 1 average: 1
    Face volume ratio check OK.

Mesh OK.

--> FOAM Warning : 
    From function virtual Foam::polyMesh::readUpdateState Foam::polyMesh::readUpdate()
    in file meshes/polyMesh/polyMeshIO.C at line 209
    unexpected consequences.  Proceed with care.
Time = 0.1

Mesh stats
    points:           7838622
    faces:            22456494
    internal faces:   21947138
    cells:            7309714
    faces per cell:   6.0746059
    boundary patches: 7
    point zones:      0
    face zones:       0
    cell zones:       0

Overall number of cells of each type:
    hexahedra:     7128224
    prisms:        0
    wedges:        0
    pyramids:      0
    tet wedges:    0
    tetrahedra:    0
    polyhedra:     181490
    Breakdown of polyhedra by number of faces:
        faces   number of cells
            6   9652
            8   249
            9   162270
           10   10
           11   10
           12   8643
           14   1
           15   592
           18   63

Checking topology...
    Boundary definition OK.
    Cell to face addressing OK.
    Point usage OK.
    Upper triangular ordering OK.
    Face vertices OK.
    Topological cell zip-up check OK.
    Face-face connectivity OK.
  <<Writing 14 cells with two non-boundary faces to set twoInternalFacesCells
    Number of regions: 1 (OK).

Checking patch topology for multiply connected surfaces...
                   Patch    Faces   Points                  Surface topology Bounding box
                   north     1154     1362  ok (non-closed singly connected) (3 18 -58.75) (228 18 0)
                    west     1149     1359  ok (non-closed singly connected) (3 -207 -55) (3 18 0)
                    east     1090     1298  ok (non-closed singly connected) (228 -207 -51.25) (228 18 0)
                   south     1142     1347  ok (non-closed singly connected) (3 -207 -55) (228 -207 0)
                  seabed        0        0                        ok (empty)
            watersurface     2025     2116  ok (non-closed singly connected) (3 -207 0) (228 18 0)
                 barkley   502796   504418  ok (non-closed singly connected) (3 -207 -65) (228 18 -47.5)

Checking geometry...
    Overall domain bounding box (3 -207 -65) (228 18 0)
    Mesh has 3 geometric (non-empty/wedge) directions (1 1 1)
    Mesh has 3 solution (non-empty) directions (1 1 1)
    Boundary openness (0 0 0) OK.
    Max cell openness = 1.4210855e-16 OK.
    Max aspect ratio = 1 OK.
    Minimum face area = 0.024414062. Maximum face area = 25.  Face area magnitudes OK.
    Min volume = 0.0038146973. Max volume = 125.  Total volume = 2723160.4.  Cell volumes OK.
    Mesh non-orthogonality Max: 25.239402 average: 4.5571039
    Non-orthogonality check OK.
    Face pyramids OK.
    Max skewness = 1 OK.
    Coupled point location match (average 0) OK.
    Face tets OK.
    Min/max edge length = 0.15625 5 OK.
  <<Writing 64 near (closer than 0.00032476915 apart) points to set nearPoints
    All angles in faces OK.
    Face flatness (1 = flat, 0 = butterfly) : min = 1  average = 1
    All face flatness OK.
    Cell determinant (wellposedness) : minimum: 0 average: 9.1220592
 ***Cells with small determinant (< 0.001) found, number of cells: 22
  <<Writing 22 under-determined cells to set underdeterminedCells
 ***Concave cells (using face planes) found, number of cells: 171838
  <<Writing 171838 concave cells to set concaveCells
    Face interpolation weight : minimum: 0.33333333 average: 0.49448083
    Face interpolation weight check OK.
    Face volume ratio : minimum: 0.125 average: 0.97102435
    Face volume ratio check OK.

Failed 2 mesh checks.

Time = 0.2

Mesh stats
    points:           7724132
    faces:            22297697
    internal faces:   21947138
    cells:            7309714
    faces per cell:   6.0528818
    boundary patches: 7
    point zones:      0
    face zones:       0
    cell zones:       0

Overall number of cells of each type:
    hexahedra:     7014556
    prisms:        40278
    wedges:        0
    pyramids:      0
    tet wedges:    576
    tetrahedra:    3
    polyhedra:     254301
    Breakdown of polyhedra by number of faces:
        faces   number of cells
            4   43519
            5   29348
            6   9818
            7   162
            8   214
            9   161934
           10   2
           11   5
           12   8643
           13   1
           14   1
           15   591
           18   63

Checking topology...
    Boundary definition OK.
    Cell to face addressing OK.
    Point usage OK.
    Upper triangular ordering OK.
    Face vertices OK.
    Topological cell zip-up check OK.
    Face-face connectivity OK.
  <<Writing 14 cells with two non-boundary faces to set twoInternalFacesCells
    Number of regions: 1 (OK).

Checking patch topology for multiply connected surfaces...
                   Patch    Faces   Points                  Surface topology Bounding box
                   north     1154     1348  ok (non-closed singly connected) (3 18 -58.44769) (228 18 0)
                    west     1149     1340  ok (non-closed singly connected) (3 -207 -55.591519) (3 18 0)
                    east     1090     1288  ok (non-closed singly connected) (228 -207 -51.631036) (228 18 0)
                   south     1142     1341  ok (non-closed singly connected) (3 -207 -55.061569) (228 -207 0)
                  seabed        0        0                        ok (empty)
            watersurface     2025     2116  ok (non-closed singly connected) (3 -207 0) (228 18 0)
                 barkley   343999   389928  ok (non-closed singly connected) (3 -207 -64.949742) (228 18 -47.551305)

Checking geometry...
    Overall domain bounding box (3 -207 -64.949742) (228 18 0)
    Mesh has 3 geometric (non-empty/wedge) directions (1 1 1)
    Mesh has 3 solution (non-empty) directions (1 1 1)
    Boundary openness (-2.7974809e-16 -3.4909474e-17 1.6006563e-14) OK.
    Max cell openness = 3.2717739e-16 OK.
    Max aspect ratio = 5.9802703 OK.
    Minimum face area = 0.0042526317. Maximum face area = 25.101297.  Face area magnitudes OK.
    Min volume = 0.00042588372. Max volume = 125.47902.  Total volume = 2722848.4.  Cell volumes OK.
    Mesh non-orthogonality Max: 50.050815 average: 5.1649528
    Non-orthogonality check OK.
    Face pyramids OK.
    Max skewness = 2.6065511 OK.
    Coupled point location match (average 0) OK.
    Face tets OK.
    Min/max edge length = 0.054500217 5.017602 OK.
   *There are 153 faces with concave angles between consecutive edges. Max concave angle = 39.928199 degrees.
  <<Writing 153 faces with concave angles to set concaveFaces
    Face flatness (1 = flat, 0 = butterfly) : min = 0.54730354  average = 0.99966578
   *There are 13 faces with ratio between projected and actual area < 0.8
    Minimum ratio (minimum flatness, maximum warpage) = 0.54730354
  <<Writing 13 warped faces to set warpedFaces
    Cell determinant (wellposedness) : minimum: 1.3552527e-20 average: 9.1241861
 ***Cells with small determinant (< 0.001) found, number of cells: 20
  <<Writing 20 under-determined cells to set underdeterminedCells
 ***Concave cells (using face planes) found, number of cells: 154909
  <<Writing 154909 concave cells to set concaveCells
    Face interpolation weight : minimum: 0.11518488 average: 0.49140119
    Face interpolation weight check OK.
    Face volume ratio : minimum: 0.025611981 average: 0.95493121
    Face volume ratio check OK.

Failed 2 mesh checks.

--> FOAM Warning : 
    From function virtual Foam::polyMesh::readUpdateState Foam::polyMesh::readUpdate()
    in file meshes/polyMesh/polyMeshIO.C at line 209
    unexpected consequences.  Proceed with care.
Time = 0.3

Mesh stats
    points:           8501455
    faces:            24447646
    internal faces:   24095816
    cells:            7995952
    faces per cell:   6.0710047
    boundary patches: 6
    point zones:      0
    face zones:       0
    cell zones:       0

Overall number of cells of each type:
    hexahedra:     7551543
    prisms:        40386
    wedges:        0
    pyramids:      0
    tet wedges:    587
    tetrahedra:    4
    polyhedra:     403432
    Breakdown of polyhedra by number of faces:
        faces   number of cells
            4   43607
            5   29279
            6   9880
            7   117302
            8   31806
            9   162113
           10   132
           11   4
           12   8652
           13   1
           14   2
           15   591
           18   63

Checking topology...
    Boundary definition OK.
    Cell to face addressing OK.
    Point usage OK.
    Upper triangular ordering OK.
    Face vertices OK.
    Topological cell zip-up check OK.
    Face-face connectivity OK.
    Number of regions: 1 (OK).

Checking patch topology for multiply connected surfaces...
                   Patch    Faces   Points                  Surface topology Bounding box
                   north     1518     1714  ok (non-closed singly connected) (3 18 -58.44769) (228 18 0)
                    west     1511     1704  ok (non-closed singly connected) (3 -207 -55.591519) (3 18 0)
                    east     1454     1654  ok (non-closed singly connected) (228 -207 -51.631036) (228 18 0)
                   south     1506     1707  ok (non-closed singly connected) (3 -207 -55.061569) (228 -207 0)
            watersurface     2025     2116  ok (non-closed singly connected) (3 -207 0) (228 18 0)
                 barkley   343816   389657  ok (non-closed singly connected) (3 -207 -64.949742) (228 18 -47.551305)

Checking geometry...
    Overall domain bounding box (3 -207 -64.949742) (228 18 0)
    Mesh has 3 geometric (non-empty/wedge) directions (1 1 1)
    Mesh has 3 solution (non-empty) directions (1 1 1)
    Boundary openness (-1.293288e-16 1.3710367e-16 1.561506e-14) OK.
    Max cell openness = 3.6181098e-16 OK.
    Max aspect ratio = 18.514103 OK.
    Minimum face area = 0.00093936106. Maximum face area = 25.598737.  Face area magnitudes OK.
    Min volume = 6.869207e-05. Max volume = 128.3009.  Total volume = 2722848.2.  Cell volumes OK.
    Mesh non-orthogonality Max: 54.998438 average: 5.5062416
    Non-orthogonality check OK.
    Face pyramids OK.
    Max skewness = 1.607339 OK.
    Coupled point location match (average 0) OK.
    Face tets OK.
    Min/max edge length = 0.0065951877 5.2278392 OK.
   *There are 2898 faces with concave angles between consecutive edges. Max concave angle = 39.89553 degrees.
  <<Writing 2898 faces with concave angles to set concaveFaces
    Face flatness (1 = flat, 0 = butterfly) : min = 0.54069791  average = 0.99967014
   *There are 14 faces with ratio between projected and actual area < 0.8
    Minimum ratio (minimum flatness, maximum warpage) = 0.54069791
  <<Writing 14 warped faces to set warpedFaces
    Cell determinant (wellposedness) : minimum: 0.0030395989 average: 8.8539072
    Cell determinant check OK.
 ***Concave cells (using face planes) found, number of cells: 128455
  <<Writing 128455 concave cells to set concaveCells
    Face interpolation weight : minimum: 0.029456128 average: 0.48533915
 ***Faces with small interpolation weight (< 0.05) found, number of faces: 11
  <<Writing 11 faces with low interpolation weights to set lowWeightFaces
    Face volume ratio : minimum: 0.018587512 average: 0.9327307
    Face volume ratio check OK.

Failed 2 mesh checks.

End
MaySea is offline   Reply With Quote

Old   November 9, 2020, 11:49
Default
  #3
Senior Member
 
M
Join Date: Dec 2017
Posts: 699
Rep Power: 12
AtoHM is on a distinguished road
Quote:
weird triangular anomalies appear between refinement zones
This has nothing to do with the mesh, its just a visual thing in Paraview. To properly see your mesh, deactivate "decompose polyhedra" at the open.foam node and deactivate "triangulate slice" for any slice views. The curved lines that will remain are created by cutting cells and can be avoided by activating "crinkle" slice or clip, depending on what you try to show.


Your checkMesh shows some failed mesh metrics, which you should tackle once you have a clear view Run snappy in a mode that gives you output of the mesh metrics, so you can visualize where the bad cells are located and find a way to improve the mesh.
Yann, Marpole and MaySea like this.
AtoHM is offline   Reply With Quote

Old   November 9, 2020, 13:28
Default
  #4
Member
 
Jan Majcher
Join Date: Nov 2018
Posts: 39
Rep Power: 8
MaySea is on a distinguished road
Thanks a lot - makes sense now.
MaySea is offline   Reply With Quote

Old   November 9, 2020, 14:16
Default
  #5
Senior Member
 
Charles
Join Date: Aug 2016
Location: Vancouver, Canada
Posts: 151
Rep Power: 10
Marpole is on a distinguished road
Thanks M. This is very helpful. Can you elaborate a bit more on your comment "Run snappy in a mode"? I'm interested in how to do it.
Quote:
Originally Posted by AtoHM View Post
This has nothing to do with the mesh, its just a visual thing in Paraview. To properly see your mesh, deactivate "decompose polyhedra" at the open.foam node and deactivate "triangulate slice" for any slice views. The curved lines that will remain are created by cutting cells and can be avoided by activating "crinkle" slice or clip, depending on what you try to show.


Your checkMesh shows some failed mesh metrics, which you should tackle once you have a clear view Run snappy in a mode that gives you output of the mesh metrics, so you can visualize where the bad cells are located and find a way to improve the mesh.
__________________
Charles L.
Marpole is offline   Reply With Quote

Old   November 9, 2020, 16:21
Default
  #6
Member
 
Jan Majcher
Join Date: Nov 2018
Posts: 39
Rep Power: 8
MaySea is on a distinguished road
Quote:
Originally Posted by Marpole View Post
Thanks M. This is very helpful. Can you elaborate a bit more on your comment "Run snappy in a mode"? I'm interested in how to do it.
Check this vid from József Nagy.

https://www.youtube.com/watch?v=Ng-flhr_JVM

You can write different types of "distorted" concave, skewed etc. cells as .vtk sets.
Marpole likes this.
MaySea is offline   Reply With Quote

Reply

Tags
snappyhexmesh, terrain


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
How to apply variabe roughness, e.g. to complex terrain? Fridolin OpenFOAM Running, Solving & CFD 3 August 12, 2020 16:09
Importing complex terrain Joăo Silva FLUENT 8 March 27, 2019 15:50
[SOWFA] how to use terrainBlockMesher for meshing a complex terrain? Muhammad Omer Mughal OpenFOAM Community Contributions 11 June 6, 2016 01:39
Meshing complex terrain CFT123 FLUENT 0 March 13, 2015 04:19
[ANSYS Meshing] Complex terrain meshing egge24 ANSYS Meshing & Geometry 0 November 5, 2014 21:05


All times are GMT -4. The time now is 22:49.