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

[snappyHexMesh] 'cracks' in Mesh on surface using STL

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 19, 2017, 07:46
Default 'cracks' in Mesh on surface using STL
  #1
New Member
 
F
Join Date: Jan 2017
Posts: 12
Rep Power: 9
Fschi is on a distinguished road
Hello,
I've got some troubles generating a good mesh with snappyHexMesh using HelyxOS as GUI.

I have a several surface-geometries of a car as STL. And I need to have a qood mesh, especially on the surface because its used for wallFilm modelling.

Below I've got 3 different pictures. The first shows the 'crack' in the mesh. The second the original STL at that point.
And in the third picture you can see the result using that mesh for the wallFilm-simulation. So it's not just some grafics problem in paraview.

I've tried to use implicit snapping, surfaceFeatureExtract, refinementBoxes but nothing helps...

Does anybody got an idea what to change?



That's the SnappyHexMeshDict for the mesh in the pictures
Code:
/*--------------------------------*- C++ -*----------------------------------*\
|       o          |                                                          |
|    o     o       | HELYX-OS                                                  |
|   o   O   o      | Version: v2.4.0                                           |
|    o     o       | Web:     http://www.engys.com                            |
|       o          |                                                          |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version 2.0;
    format ascii;
    class dictionary;
    location system;
    object snappyHexMeshDict;
}

    castellatedMesh true;
    snap true;
    addLayers true;
    geometry
    {
        car_side.stl
        {
            type triSurfaceMesh;
            name car_side;
            appendRegionName false;
        }

        car_mirror.stl
        {
            type triSurfaceMesh;
            name car_mirror;
            appendRegionName false;
        }

        car_window.stl
        {
            type triSurfaceMesh;
            name car_window;
            appendRegionName false;
        }

        car_A_pillar.stl
        {
            type triSurfaceMesh;
            name car_A_pillar;
            appendRegionName false;
        }

        refinementBox
        {
            type searchableBox;
            min ( -0.2 -1.2 0.4 );
            max ( 1.4 -0.3 1.4 );
        }

    }

    castellatedMeshControls
    {
        features
        (
        );
        refinementSurfaces
        {
            car_side
            {
                level ( 6 6 );
            }

            car_mirror
            {
                level ( 6 6 );
            }

            car_window.stl
            {
                level ( 3 3 );
            }

            car_A_pillar
            {
                level ( 6 6 );
            }

        }

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

        }

        locationInMesh ( 1.0 -0.6 1.15 );
        maxLocalCells 500000;
        maxGlobalCells 4000000;
        minRefinementCells 0;
        nCellsBetweenLevels 3;
        resolveFeatureAngle 30.0;
        allowFreeStandingZoneFaces true;
        planarAngle 30.0;
        maxLoadUnbalance 0.1;
    }

    snapControls
    {
        nSolveIter 30;
        nSmoothPatch 15;
        tolerance 5.0;
        nRelaxIter 20;
        nFeatureSnapIter 25;
        implicitFeatureSnap false;
        explicitFeatureSnap true;
        multiRegionFeatureSnap false;
    }

    addLayersControls
    {
        layers
        {
        }

        relativeSizes true;
        expansionRatio 1.0;
        finalLayerThickness 0.3;
        minThickness 0.25;
        nGrow 0;
        featureAngle 130.0;
        slipFeatureAngle 30.0;
        nRelaxIter 5;
        nSmoothSurfaceNormals 1;
        nSmoothNormals 3;
        nSmoothThickness 10;
        maxFaceThicknessRatio 0.5;
        maxThicknessToMedialRatio 0.3;
        minMedialAxisAngle 90;
        nBufferCellsNoExtrude 0;
        nLayerIter 50;
        nRelaxedIter 20;
        writeVTK false;
        noErrors false;
        layerRecovery 1;
        growZoneLayers false;
        projectGrownUp 0.0;
    }

    meshQualityControls
    {
        maxNonOrtho 65.0;
        maxBoundarySkewness 20;
        maxInternalSkewness 4;
        maxConcave 80.0;
        minFlatness 0.5;
        minVol 1.0E-13;
        minTetQuality 1.0E-15;
        minArea -1.0;
        minTwist 0.02;
        minDeterminant 0.001;
        minFaceWeight 0.05;
        minVolRatio 0.01;
        minTriangleTwist -1.0;
        nSmoothScale 4;
        errorReduction 0.75;
        relaxed
        {
            maxNonOrtho 75;
        }

    }

    debug 0;
    mergeTolerance 1.0E-6;
    autoBlockMesh false;
and checkMesh:
Code:
...

Checking geometry...
    Overall domain bounding box (-1.5 -1.3 0.499994189) (3.5 7.236849546e-35 1.5)
    Mesh has 3 geometric (non-empty/wedge) directions (1 1 1)
    Mesh has 3 solution (non-empty) directions (1 1 1)
    Boundary openness (-1.751362408e-17 5.916174453e-16 8.765075835e-16) OK.
    Max cell openness = 6.012466732e-16 OK.
    Max aspect ratio = 22.62027622 OK.
    Minimum face area = 1.424391158e-07. Maximum face area = 0.01792372431.  Face area magnitudes OK.
    Min volume = 3.321075353e-10. Max volume = 0.002282463027.  Total volume = 5.595986151.  Cell volumes OK.
    Mesh non-orthogonality Max: 66.78962882 average: 7.806298952
    Non-orthogonality check OK.
    Face pyramids OK.
    Max skewness = 3.76298589 OK.
    Coupled point location match (average 0) OK.

Mesh OK.
Attached Images
File Type: png Error_in_Mesh.png (36.9 KB, 60 views)
File Type: png original_STL.png (34.8 KB, 59 views)
File Type: png Error_WallFilm.png (48.5 KB, 58 views)
Fschi is offline   Reply With Quote

Old   January 19, 2017, 07:58
Default
  #2
Senior Member
 
akidess's Avatar
 
Anton Kidess
Join Date: May 2009
Location: Germany
Posts: 1,377
Rep Power: 29
akidess will become famous soon enough
Fix the STL?
__________________
*On twitter @akidTwit
*Spend as much time formulating your questions as you expect people to spend on their answer.
akidess is offline   Reply With Quote

Old   January 19, 2017, 08:07
Default
  #3
New Member
 
F
Join Date: Jan 2017
Posts: 12
Rep Power: 9
Fschi is on a distinguished road
as far as I understand, the STL is ok. The problem doesn't appear always on the same point of the geometry.
So I thougth, it's an meshing error, not of the STL
Fschi is offline   Reply With Quote

Old   January 19, 2017, 08:33
Default
  #4
Senior Member
 
akidess's Avatar
 
Anton Kidess
Join Date: May 2009
Location: Germany
Posts: 1,377
Rep Power: 29
akidess will become famous soon enough
Did you surfaceCheck the STLs?
__________________
*On twitter @akidTwit
*Spend as much time formulating your questions as you expect people to spend on their answer.
akidess is offline   Reply With Quote

Old   January 19, 2017, 09:22
Default
  #5
New Member
 
F
Join Date: Jan 2017
Posts: 12
Rep Power: 9
Fschi is on a distinguished road
ok I think you are right! if I understand the output of surfaceCheck correctly I have to work on the stl...

Code:
/*---------------------------------------------------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  4.1                                   |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
Build  : 4.1
Exec   : surfaceCheck constant/triSurface/Spiegelregion.stl
Date   : Jan 19 2017
Time   : 15:11:15
....
nProcs : 1
sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster
allowSystemOperations : Allowing user-supplied system call operations

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Reading surface from "constant/triSurface/Spiegelregion.stl" ...

Statistics:
Triangles    : 42809
Vertices     : 21415
Bounding Box : (0.07 -0.790212 0.6) (1.17 -0.5 1.12464)

Region	Size
------	----
Exported_from_Blender-2.74_(sub_0)	42809


Surface has no illegal triangles.

Triangle quality (equilateral=1, collapsed=0):
    0 .. 0.05  : 0.0726016
    0.05 .. 0.1  : 0.0334743
    0.1 .. 0.15  : 0.0217244
    0.15 .. 0.2  : 0.0181971
    0.2 .. 0.25  : 0.0159546
    0.25 .. 0.3  : 0.0164919
    0.3 .. 0.35  : 0.0188278
    0.35 .. 0.4  : 0.0216777
    0.4 .. 0.45  : 0.0295031
    0.45 .. 0.5  : 0.02371
    0.5 .. 0.55  : 0.0319092
    0.55 .. 0.6  : 0.0406223
    0.6 .. 0.65  : 0.0571142
    0.65 .. 0.7  : 0.0771333
    0.7 .. 0.75  : 0.112873
    0.75 .. 0.8  : 0.27041
    0.8 .. 0.85  : 0.0464856
    0.85 .. 0.9  : 0.03268
    0.9 .. 0.95  : 0.0261861
    0.95 .. 1  : 0.0324231

    min 0 for triangle 34757
    max 0.999993 for triangle 24817

--> FOAM Warning : 
    From function int main(int, char**)
    in file surfaceCheck.C at line 371
    0. This might give problems in self-intersection testing later on.
Dumping bad quality faces to "badFaces"
Paste this into the input for surfaceSubset


Edges:
    min 5.00679e-06 for edge 54594 points (0.235606 -0.5 0.658116)(0.235606 -0.5 0.658121)
    max 1.06807 for edge 63483 points (1.15987 -0.79019 0.6)(0.092734 -0.745425 0.6)

Checking for points less than 1e-6 of bounding box ((1.1 0.290212 0.52464) metre) apart.
Found 0 nearby points.

Surface is not closed since not all edges connected to two faces:
    connected to one face : 17
    connected to >2 faces : 0
Conflicting face labels:17
Dumping conflicting face labels to "problemFaces"
Paste this into the input for surfaceSubset

Number of unconnected parts : 6
Splitting surface into parts ...

Writing zoning to "zone_Spiegelregion.vtk"...

writing part 0 size 42802 to "Spiegelregion_0.obj"
writing part 1 size 1 to "Spiegelregion_1.obj"
writing part 2 size 1 to "Spiegelregion_2.obj"
writing part 3 size 3 to "Spiegelregion_3.obj"
writing part 4 size 1 to "Spiegelregion_4.obj"
writing part 5 size 1 to "Spiegelregion_5.obj"

Number of zones (connected area with consistent normal) : 6
More than one normal orientation.


End
thanks a lot!
Fschi is offline   Reply With Quote

Old   January 19, 2017, 12:24
Default
  #6
New Member
 
F
Join Date: Jan 2017
Posts: 12
Rep Power: 9
Fschi is on a distinguished road
with checkMesh I found some errors in the STL, but still I have the same Problem. At the regions with the errors are a lot of concaveFaces - an example is in the pictures below..

how can I delete them? whats a good value for maxConcave?
Attached Images
File Type: png Mesh.png (23.5 KB, 31 views)
File Type: png Mesh_concaveFaces.png (23.8 KB, 29 views)
File Type: png concaveFaces.png (5.7 KB, 28 views)
Fschi is offline   Reply With Quote

Reply

Tags
snappyhesmeshdict, stl, surfacefeatureextract, wallfilm

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
[snappyHexMesh] snappyHexMesh does not create any mesh except one for the reference cell Arman_N OpenFOAM Meshing & Mesh Conversion 1 May 20, 2019 17:16
[snappyHexMesh] Layers:problem with curvature giulio.topazio OpenFOAM Meshing & Mesh Conversion 10 August 22, 2012 09:03
[snappyHexMesh] Layers don't fully surround surface EVBUCF OpenFOAM Meshing & Mesh Conversion 14 August 20, 2012 04:31
[snappyHexMesh] external flow with snappyHexMesh chelvistero OpenFOAM Meshing & Mesh Conversion 11 January 15, 2010 19:43
CFX4.3 -build analysis form Chie Min CFX 5 July 12, 2001 23:19


All times are GMT -4. The time now is 23:20.