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

[snappyHexMesh] SnappyHexMesh Ship Hull with Appendages Problem

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 3, 2017, 22:46
Default SnappyHexMesh Ship Hull with Appendages Problem
  #1
New Member
 
Join Date: Nov 2014
Posts: 11
Rep Power: 12
bizzy is on a distinguished road
Dear Community,

I am writing my Master's Thesis with OpenFOAM. Therefore I would like to use SnappyHexMesh as Mesher. But after several days of trying I can not overcome the following problem. In the internal field, there are many little faces freely hanging. Please see the image attached. Maybe you faced a problem like this and can help me.

Best regards

Code:
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    object      snappyHexMeshDict;
}
// Auswahl der durchzufuehrenden Meshing-Schritte
castellatedMesh true;
snap            true;
addLayers       true;
/* ------------------------------ */
/* 0. SCHRITT: Geomterie einlesen */
/* ------------------------------ */
geometry
{
    hull_appended_sc.stl
    {
        type triSurfaceMesh;
        name hull;
    }
    refinementBox
    {
        type searchableBox;
        min (-999  -999  -0.2);
        max (999 999 0.2);
    }
    rudder_sc.stl
    {
        type triSurfaceMesh;
        name rudder;
    }
    shaft_sc.stl
    {
        type triSurfaceMesh;
        name shaft;
    }
    stabi_sc.stl
    {
        type triSurfaceMesh;
        name stabi;
    }
};
/* --------------------------------------- */
/* 1. SCHRITT: Mesh mit Bloecken annaehern */
/* --------------------------------------- */
castellatedMeshControls
{
    locationInMesh (-0.1 0.0 0.0);
    maxLocalCells 1000000;
    maxGlobalCells 7000000;
    minRefinementCells 1; // Std.: 3
    nCellsBetweenLevels 1;
    resolveFeatureAngle 5; // Alle Winkel kleiner als NICHT aufloesen
    features
    (
        {
            file "hull_appended_sc.eMesh";
            level 0;
        }
    );
    refinementSurfaces
    {
        hull
        {
            level (0 0);        
            patchInfo
            {
                type wall;
            }
        }
    }
    refinementRegions
    {
        hull
        {
            mode distance;
            levels ((0.01 4));    
        }
        refinementBox
        {
            mode inside;
            levels ((1E15 1));
        }
        rudder
        {
            mode distance;
            levels ((0.01 7));    
        }
        shaft
        {
            mode distance;
            levels ((0.01 7));    
        }
        stabi
        {
            mode distance;
            levels ((0.01 7));    
        }
    }
    allowFreeStandingZoneFaces false;
}
/* -------------------------------------------- */
/* 2. SCHRITT: Bloecke auf die Flaeche druecken */
/* -------------------------------------------- */
snapControls
{
    nSmoothPatch 3;
    tolerance 1;
    nSolveIter 100;
    nRelaxIter 5;
    // Folgende Einstellungen sorgen for Explizites Feature-Snapping
    // Wichtig, um die Kanten genau zu erfassen!
    nFeatureSnapIter 10;
    implicitFeatureSnap true;
    explicitFeatureSnap false;
    multiRegionFeatureSnap false;
}
/* --------------------------------------- */
/* 3. SCHRITT: Aufloesung der Grenzschicht */
/* --------------------------------------- */
addLayersControls
{
    layers
    {
        hull
        {
            nSurfaceLayers 1;
        }
    }
    relativeSizes true;
    expansionRatio 1;
    finalLayerThickness 1;    
    //firstLayerThickness 0.02;
    minThickness 0.0001;
    nGrow 0;
    featureAngle 180; // hoeher, um BL-Collapsing zu vermeiden
    nRelaxIter 5;
    nSmoothSurfaceNormals 0;
    nSmoothNormals 0;
    nSmoothThickness 0;
    maxFaceThicknessRatio 1;
    maxThicknessToMedialRatio 1;
    minMedianAxisAngle 90;
    nBufferCellsNoExtrude 0;
    nLayerIter 50; // Std.: 50
}
meshQualityControls
{
    maxNonOrtho 75;
    maxBoundarySkewness 20;
    maxInternalSkewness 5;
    minTwist 0.05;
    //
    maxConcave 80;
    minVol 1e-13; 
    minTetQuality 1e-30;
    minArea -1;
    minDeterminant 0.001;
    minFaceWeight 0.05;
    minVolRatio 0.01;
    minTriangleTwist -1;
    //
    nSmoothScale 4;
    errorReduction 0.75;
}
writeFlags
(
    scalarLevels // write volScalarField with cellLevel for postprocessing
    layerSets // write cellSets, faceSets of faces in layer
    layerFields // write volScalarField for layer coverage
);
debug 0;
mergeTolerance 0;
Attached Images
File Type: jpg appendages.jpg (124.3 KB, 114 views)
File Type: jpg shaft.jpg (41.1 KB, 98 views)
bizzy is offline   Reply With Quote

Old   December 4, 2017, 04:59
Default
  #2
Member
 
LVDH's Avatar
 
Andre Z
Join Date: Dec 2009
Posts: 75
Rep Power: 17
LVDH is on a distinguished road
You have quite a few strange values in there.
I suggest you go to the motorBike tutorial and copy the snap, mesh quality and layer controls into your case. It will immediately look much better. After that you can start the fine tuning.
__________________
www.MantiumCAE.com
LVDH is offline   Reply With Quote

Old   December 4, 2017, 13:16
Default
  #3
New Member
 
Join Date: Nov 2014
Posts: 11
Rep Power: 12
bizzy is on a distinguished road
Thanks for your answer but unfortunately it did not help. Any other ideas?
bizzy is offline   Reply With Quote

Old   December 5, 2017, 06:34
Default
  #4
Senior Member
 
Canakkale Dardanelspor
Join Date: Aug 2012
Posts: 135
Rep Power: 14
HakikiCanakkaleli is on a distinguished road
can you send us checkMesh -allTopology -allGeometry results?

It (qualitatively) seems you have lots of warped faces.
HakikiCanakkaleli is offline   Reply With Quote

Old   December 5, 2017, 13:54
Default
  #5
New Member
 
Join Date: Nov 2014
Posts: 11
Rep Power: 12
bizzy is on a distinguished road
There you go...

Quote:
Mesh has 3 geometric (non-empty/wedge) directions (1 1 1)
Mesh has 3 solution (non-empty) directions (1 1 1)
Boundary openness (4.24365747297759814206518012161e-18 -3.63048555138641284945918888484e-16 -1.04904310229628548818473636743e-16) OK.
***High aspect ratio cells found, Max aspect ratio: 1.0287793015864689857545784355e+96, number of cells 948
<<Writing 948 cells with high aspect ratio to set highAspectRatioCells
Minimum face area = 5.08928237818583852418239516207e-08. Maximum face area = 0.0671884215712931082142844729788. Face area magnitudes OK.
***Zero or negative cell volume detected. Minimum negative volume: -5.44615195099730826497807980452e-07, Number of negative volume cells: 948
<<Writing 948 zero volume cells to set zeroVolumeCells
Mesh non-orthogonality Max: 179.848293338566861621075076982 average: 15.1502756844989594497974394471
*Number of severely non-orthogonal (> 70 degrees) faces: 1082.
***Number of non-orthogonality errors: 3374.
<<Writing 4456 non-orthogonal faces to set nonOrthoFaces
***Error in face pyramids: 6166 faces are incorrectly oriented.
<<Writing 4280 faces with incorrect orientation to set wrongOrientedFaces
***Max skewness = 2089.65935744439184418297372758, 416 highly skew faces detected which may impair the quality of the results
<<Writing 416 skew faces to set skewFaces
Coupled point location match (average 0) OK.
***Error in face tets: 26129 faces with low quality or negative volume decomposition tets.
<<Writing 17580 faces with low quality or negative volume decomposition tets to set lowQualityTetFaces
*Edges too small, min/max edge length = 2.22213946940253632495898910112e-16 0.262948855127592695524185728573, number too small: 2
<<Writing 2 points on short edges to set shortEdges
*There are 7604 faces with concave angles between consecutive edges. Max concave angle = 89.9968061761147879451527842321 degrees.
<<Writing 7604 faces with concave angles to set concaveFaces
Face flatness (1 = flat, 0 = butterfly) : min = 0.0225365394298082735713428803592 average = 0.998153579054311457241510652239
*There are 1813 faces with ratio between projected and actual area < 0.800000000000000044408920985006
Minimum ratio (minimum flatness, maximum warpage) = 0.0225365394298082735713428803592
<<Writing 1813 warped faces to set warpedFaces
Cell determinant (wellposedness) : minimum: 1.40417536025061462368057618733e-05 average: 10.1009866883079855170990413171
***Cells with small determinant (< 0.00100000000000000002081668171172) found, number of cells: 21
<<Writing 21 under-determined cells to set underdeterminedCells
***Concave cells (using face planes) found, number of cells: 24331
<<Writing 24331 concave cells to set concaveCells
Face interpolation weight : minimum: 0.000301025818403084083601378706518 average: 0.479507445539028354097865758376
***Faces with small interpolation weight (< 0.0500000000000000027755575615629) found, number of faces: 496
<<Writing 496 faces with low interpolation weights to set lowWeightFaces
Face volume ratio : minimum: -701.618312448597407637862488627 average: 0.901746231031365086394657737401
***Faces with small volume ratio (< 0.0100000000000000002081668171172) found, number of faces: 3117
<<Writing 3117 faces with low volume ratio cells to set lowVolRatioFaces

Failed 10 mesh checks.

End
bizzy is offline   Reply With Quote

Old   December 6, 2017, 05:29
Default
  #6
Senior Member
 
Canakkale Dardanelspor
Join Date: Aug 2012
Posts: 135
Rep Power: 14
HakikiCanakkaleli is on a distinguished road
The wisest advice is to start learning snappyHexMesh while there are conflicting settings in your snappyHexMeshDict, e.g. the features were extracted; yet implicitFeature was on, and there is no subtle way to fix the problems of this particular mesh as you should have seen this by yourself from checkMesh output.
One educated guess is that your STL files are likely crude, and needs to be considerably improved whilst snappyHexMesh is known to operate well on quantitatively good surface mesh.
HakikiCanakkaleli is offline   Reply With Quote

Old   December 6, 2017, 05:53
Default
  #7
Member
 
LVDH's Avatar
 
Andre Z
Join Date: Dec 2009
Posts: 75
Rep Power: 17
LVDH is on a distinguished road
Yes, you should try once more to run with the motorbike tutorial setting. What sense does one surface layer with final layer thickness being one make?
Also I would try using refinement in the refinementSurfaces section, even if you are using it later in the refinementRegions.
And creating a mesh with the tutorial settings, you should have a good look at the rest of your settings.
__________________
www.MantiumCAE.com
LVDH is offline   Reply With Quote

Old   December 14, 2017, 17:22
Default
  #8
New Member
 
Join Date: Nov 2014
Posts: 11
Rep Power: 12
bizzy is on a distinguished road
I think it was just a sort of visualization problem. My simulations crashed due to another problem, which I could overcome by using "MeshLab" to clean the STL file. Another very important step was to adjust the "mergeTolerance" setting in SHM to an appropriate value. Now my simulations run very good and stable.
bizzy 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
[snappyHexMesh] Problem with snappyHexMesh overwrite Manideep Reddy OpenFOAM Meshing & Mesh Conversion 6 July 29, 2023 02:05
#important#_two phase analysis around a ship hull jamil048 FLUENT 0 November 14, 2017 13:14
[snappyHexMesh] Problem with snappyHexMesh command zino12 OpenFOAM Meshing & Mesh Conversion 0 February 18, 2016 09:02
[snappyHexMesh] Ship hull using snappyHexMesh nuovodna OpenFOAM Meshing & Mesh Conversion 1 June 28, 2011 11:45
[ICEM] Structured mesh on ship hull nuovodna ANSYS Meshing & Geometry 4 March 4, 2010 11:19


All times are GMT -4. The time now is 19:03.