|
[Sponsors] |
[snappyHexMesh] SHM doesn´t snap reliable to feature edge |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
June 16, 2019, 11:30 |
SHM doesn´t snap reliable to feature edge
|
#1 |
New Member
Join Date: May 2019
Posts: 3
Rep Power: 7 |
Hi folks,
first of all I want to say that this forum helped me a lot already just by reading threads. Unfortunately I have to open my first thread, because I despair of using SnappyHexMesh with my geometry. Originally I use several STL files which form a pump passage geometry (therefore it´s more complex), but to make things as simple as possible I will use another geometry to describe the problems I am facing. I get the same "problematic" results with those geometrys. The main problem is SnappyHexMesh not snapping to the edges in a reliable manner. The white lines represent the detected feature edges. So every edge was detected correctly. But SHM fails at the snapping process, see pictures below. My settings are as follows... Code:
castellatedMeshControls { maxLocalCells 100000; maxGlobalCells 2000000; minRefinementCells 0; maxLoadUnbalance 0.1; nCellsBetweenLevels 2; features ( { file "model1c.eMesh"; level 3; } ); Code:
refinementSurfaces { model1c { level (2 2); } } Code:
snapControls { nSmoothPatch 4; tolerance 5; nSolveIter 300; nRelaxIter 5; nFeatureSnapIter 10; implicitFeatureSnap false; explicitFeatureSnap true; multiRegionFeatureSnap true; } Does somebody see my mistake? It´s a quite common geometry, so I think it should be possible to mesh it with SHM. If you have any idea or suggestion or if you need more information, please let me know. Many thanks in advance. Leon Edit: I am stupid. I wondered why there's no surface refinement step in my castellated mesh. I looked at the number of cells...they are above the maximum global cells. So SHM won't be refine anything at all. Now I used a higher maximum global cells setting and got better results, but defects are still there. Maybe I am on the right way at least. Last edited by OpenFOOL; June 17, 2019 at 09:20. |
|
June 18, 2019, 10:00 |
New run
|
#2 |
New Member
Join Date: May 2019
Posts: 3
Rep Power: 7 |
Ok, now I changed the maxGlobalCells entry and made a refinement at the profile. The red lines indicate the feature edges. They're correctly identified by surfaceFeatureExtract. But still I get those distortions, no matter what I try. Does somebody know what I could do else?
Many thanks in advance My current settings are as follows... blockMeshDict Code:
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 5 | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; location "system"; object blockMeshDict; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // convertToMeters 1; vertices ( (-210 -210 -10) (210 -210 -10) (210 210 -10) (-210 210 -10) (-210 -210 110) (210 -210 110) (210 210 110) (-210 210 110) ); blocks ( hex (0 1 2 3 4 5 6 7) (63 63 15) simpleGrading (1 1 1) ); edges ( ); boundary ( ); mergePatchPairs ( ); // ************************************************************************* // Code:
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 5 | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; location "system"; object snappyHexMeshDict; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // castellatedMesh true; snap true; addLayers false; geometry { model1c { type triSurfaceMesh; file "model1c.stl"; } }; castellatedMeshControls { maxLocalCells 2000000; maxGlobalCells 10000000; minRefinementCells 0; maxLoadUnbalance 0.1; nCellsBetweenLevels 1; features ( { file "model1c.eMesh"; level 3; } ); refinementSurfaces { model1c { level (2 4); } } resolveFeatureAngle 30; refinementRegions { } locationInMesh (-40 0 90); allowFreeStandingZoneFaces true; } snapControls { nSmoothPatch 4; tolerance 4; nSolveIter 200; nRelaxIter 5; nFeatureSnapIter 10; implicitFeatureSnap false; explicitFeatureSnap true; multiRegionFeatureSnap true; } addLayersControls { relativeSizes true; layers { model1c { nSurfaceLayers 1; } } expansionRatio 1; finalLayerThickness 0.3; minThickness 0.1; nGrow 0; featureAngle 30; nRelaxIter 3; nSmoothSurfaceNormals 1; nSmoothNormals 3; nSmoothThickness 10; maxFaceThicknessRatio 0.5; maxThicknessToMedialRatio 0.3; minMedianAxisAngle 90; nBufferCellsNoExtrude 0; nLayerIter 50; nRelaxedIter 20; } meshQualityControls { maxNonOrtho 65; maxBoundarySkewness 20; maxInternalSkewness 4; maxConcave 80; minFlatness 0.5; //minVol 1e-13; minVol 1e-13; minTetQuality -1; minArea -1; minTwist 0.01; minDeterminant 0.001; minFaceWeight 0.05; minVolRatio 0.01; minTriangleTwist -1; nSmoothScale 4; errorReduction 0.75; relaxed { } } mergeTolerance 1e-06; // ************************************************************************* // Code:
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 5 | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; location "system"; object surfaceFeatureExtractDict; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // model1c.stl { extractionMethod extractFromSurface; extractFromSurfaceCoeffs { includedAngle 150; } subsetFeatures { nonManifoldEdges no; openEdges yes; } trimFeatures { minElem 0; minLen 0; } writeFeatureEdgeMesh yes; writeObj yes; } // ************************************************************************* // |
|
August 7, 2020, 08:42 |
|
#3 |
New Member
Join Date: Aug 2020
Posts: 16
Rep Power: 6 |
Hello!
may I ask if you solved your problem so far? I am having a similar problem with distortions. You can see my geometry in the attached file. It is basicly the internal fluid volume in a decanter centrifuge. The empty areas are screwflights which snappy could snap well, but I have some missing parts alon the edges. |
|
August 8, 2020, 13:08 |
|
#4 |
Senior Member
Claudio Boezio
Join Date: May 2020
Location: Europe
Posts: 137
Rep Power: 7 |
Hi Leon,
You could try to increase the resolution of your input geometry file, e.g. stl ro obj file. For snappyHexMesh to snap correctly it is important that the faces of the geometry file are smaller than the desired mesh faces. So preferrably use a too fine geometry file, it doesn't hurt. You can also check your geometry file with ParaView and then apply the Feature Edges filter. You can then adjust the feature angle until the edges you need in your mesh are continuous without gaps. Note that the angle indicated in the Feature Edges filter is reversed in relation to the one needed in surfaceFeatureDict. Thus, if according to Feature Edges an angle of 30° looks okay, then in surfaceFeatureDict you'll have to specify 150. Hope this helps, cheers |
|
December 8, 2022, 22:30 |
|
#5 |
Member
Federico Zabaleta
Join Date: May 2016
Posts: 47
Rep Power: 10 |
Hello Claudio,
Just out of curiosity, how do you know this?? There is very little information about the characteristics of the .stl file, other than it should be closed. I am having a lot of issues with reliable snaping, and I recall that I read something somewhere about the .stl file, but I could not find what or where. |
|
January 4, 2023, 11:58 |
|
#6 | |
Senior Member
Franco
Join Date: Nov 2019
Location: Compiègne, France
Posts: 129
Rep Power: 7 |
Quote:
Creating waterproof STL using snappyHexMesh or salome |
||
Tags |
feature edge handling, snap controls, snappy hex mesh, watertight |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[snappyHexMesh] Failed Edge Snap with box geometry and correct feature capture | thiagomarinho | OpenFOAM Meshing & Mesh Conversion | 7 | May 7, 2022 10:19 |
how to set periodic boundary conditions | Ganesh | FLUENT | 15 | November 18, 2020 07:09 |
[snappyHexMesh] SHM: sharp edge resolving problem with explicit feature edges | piotr.mecht | OpenFOAM Meshing & Mesh Conversion | 21 | May 9, 2020 15:56 |
[snappyHexMesh] SHM: feature edge snapping not conforming | thab | OpenFOAM Meshing & Mesh Conversion | 3 | November 26, 2012 15:04 |
fluent add additional zones for the mesh file | SSL | FLUENT | 2 | January 26, 2008 12:55 |