|
[Sponsors] |
February 28, 2019, 07:26 |
Patches disappear after snappyHexMesh
|
#1 |
Member
Chris Schäfer
Join Date: Apr 2017
Posts: 34
Rep Power: 9 |
Hi There,
I have a Terrain-Area STL (Area.stl) file which I wanted to mesh with snappyHexMesh as the ground of my Box. First I run blockMesh afterwards surfaceFeatureExtract and then snappy. When snappy is finished, the patches of the Box defined in BlockMesh (minx,maxX,minX and maxY) disappears in the Boundary file inside the constant folder. I am a bit desperate, because I did it already a view times with other terrain geometries, and I have not seen this kind of effect before. Can anyone tell me why this happened? What I observe during snappyhexmesh is running,by an intermediate saving, the patches kept, but the nFaces entry are all set to 0, afterwards at the end, they are totally diapered. Thank you. Boundary File after snappyHexMesh: Code:
1 ( terrain { type wall; inGroups 1(wall); nFaces 1269326; startFace 7528417; } ) Code:
( minX { type patch; nFaces 1000; startFace 288000; } maxX { type patch; nFaces 1000; startFace 289000; } ground { type wall; inGroups 1(wall); nFaces 10000; startFace 290000; } minY { type patch; nFaces 1000; startFace 300000; } maxY { type patch; nFaces 1000; startFace 301000; } topAtm { type patch; nFaces 10000; startFace 302000; } ) Code:
FoamFile { version 2.0; format ascii; class dictionary; object blockMeshDict; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // backgroundMesh { xMin -24500; xMax 24500; yMin -25500; yMax 25500; zMin -100; zMax 1500; xCells 100; yCells 100; zCells 10; } convertToMeters 1; vertices ( ($:backgroundMesh.xMin $:backgroundMesh.yMin $:backgroundMesh.zMin) ($:backgroundMesh.xMax $:backgroundMesh.yMin $:backgroundMesh.zMin) ($:backgroundMesh.xMax $:backgroundMesh.yMax $:backgroundMesh.zMin) ($:backgroundMesh.xMin $:backgroundMesh.yMax $:backgroundMesh.zMin) ($:backgroundMesh.xMin $:backgroundMesh.yMin $:backgroundMesh.zMax) ($:backgroundMesh.xMax $:backgroundMesh.yMin $:backgroundMesh.zMax) ($:backgroundMesh.xMax $:backgroundMesh.yMax $:backgroundMesh.zMax) ($:backgroundMesh.xMin $:backgroundMesh.yMax $:backgroundMesh.zMax) ); blocks ( hex (0 1 2 3 4 5 6 7) ( $:backgroundMesh.xCells $:backgroundMesh.yCells $:backgroundMesh.zCells ) simpleGrading (1 1 1) ); edges ( ); boundary ( minX { type patch; faces ( (0 3 7 4) ); } maxX { type patch; faces ( (1 5 6 2) ); } ground { type wall; faces ( (0 1 2 3) ); } minY { type patch; faces ( (0 4 5 1) ); } maxY { type patch; faces ( (3 2 6 7) ); } topAtm { type patch; faces ( (4 7 6 5) ); } ); mergePatchPairs ( ); // ************************************************************************* // Code:
FoamFile { version 3.0; format ascii; class dictionary; object snappyHexMeshDict; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // castellatedMesh true; snap true; addLayers true; geometry { Area.stl { type triSurfaceMesh; name terrain patchinfo { type wall; } } box { type searchableBox; min (-2000 -2000 0); max (2000 2000 2000); } }; castellatedMeshControls { maxLocalCells 200000000; maxGlobalCells 300000000; minRefinementCells 20; nCellsBetweenLevels 4; maxLoadUnbalance 0.1; allowFreeStandingZoneFaces true; resolveFeatureAngle 30; features ( { file "Area.eMesh" ; level 3 ; } ); refinementSurfaces { terrain { level (3 3); } } refinementRegions { } locationInMesh ( 0 0 10 ) ; } snapControls { tolerance 2; implicitFeatureSnap false; explicitFeatureSnap true; multiRegionFeatureSnap true; detectNearSurfacesSnap true; nSmoothPatch 2; nSolveIter 50; nRelaxIter 5; nFeatureSnapIter 10; } addLayersControls { layers { ground { nSurfaceLayers 7; firstLayerThickness 0.025; expansioRatio 1.22; } } firstLayerThickness 0.025; relativeSizes true ; expansionRatio 1.2 ; featureAngle 85; slipFeatureAngle 30; nGrow 0; nBufferCellsNoExtrude 0; minMedianAxisAngle 90; maxFaceThicknessRatio 0.2; maxThicknessToMedialRatio 0.3; minThickness 0.001; nLayerIter 50; nRelaxIter 5; nSmoothSurfaceNormals 10; nSmoothNormals 3; nSmoothThickness 10; nRelaxedIter 30; nMedialAxisIter 10; displacementLaplacianCoeffs { diffusivity quadratic inverseDistance ("ground"); } } meshQualityControls { minVol 1e-20; minTetQuality 1e-20; minArea 1e-20; minTwist 0.005; minDeterminant 0.0001; minFaceWeight 0.002; minVolRatio 0.0001; minTriangleTwist -1; minFlatness 0.5; maxNonOrtho 65; maxBoundarySkewness 20; maxInternalSkewness 4; maxConcave 80; nSmoothScale 4; errorReduction 0.75; relaxed { maxNonOrtho 75; maxInternalSkewness 8; } } mergeTolerance 1e-08; debug 0; |
|
March 1, 2019, 04:24 |
|
#2 |
Senior Member
Robert
Join Date: May 2015
Location: Bremen, GER
Posts: 292
Rep Power: 12 |
Difficult question to answer, especially since you have allready completed successful sHM runs. Here are a few ideas:
- Check your locationInMesh. Does it sit above the terrain and within your domain? - sHM struggles with non-watertight stl-files. Does your Area.stl have any holes? - How did you create your Area.stl? If it is constructed from multiple parts it becomes more likely that sHM will fail due to not being watertight.
__________________
If you liked my answer to your question, please consider leaving a "Like" in return |
|
March 5, 2019, 10:09 |
|
#3 |
Member
Chris Schäfer
Join Date: Apr 2017
Posts: 34
Rep Power: 9 |
Dear Robert,
thank you for your help. The problem was that I set the LocationInMesh inside the terrain STL file (Ground) and not inside the background mesh (generated by blockMesh) . So I set it a bit higher and it works.... kind regards |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Foam::error::PrintStack | almir | OpenFOAM Running, Solving & CFD | 92 | May 21, 2024 08:56 |
Problem using AMI | vinz | OpenFOAM Running, Solving & CFD | 298 | November 13, 2023 09:19 |
[snappyHexMesh] snappyHexMesh does not create boundary patches from .stl files | bug_or_feature | OpenFOAM Meshing & Mesh Conversion | 7 | August 30, 2016 20:18 |
Possible bug with stitchMesh and cyclics in OpenFoam | Jack001 | OpenFOAM Pre-Processing | 0 | May 21, 2016 09:00 |
[snappyHexMesh] On which patches to set BC's for snappyHexMesh ? | Talder | OpenFOAM Meshing & Mesh Conversion | 0 | November 8, 2015 19:25 |