|
[Sponsors] |
[snappyHexMesh] SnappyHexMesh for big complex city STL |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
March 21, 2024, 17:24 |
SnappyHexMesh for big complex city STL
|
#1 |
New Member
Amirreza
Join Date: Mar 2020
Posts: 17
Rep Power: 6 |
Hi
I've stuck in a problem with [snappyHexMesh]. I need too mesh a big complex city, but when meshing process is finished the result is terrible! the box-shaped buildings get deformed (see the picture attached ) I increased the level values in castellatedMeshControls block, in addition the value of the resolvedFeatureAngle is set 175. but no considerable changes occurred!! is there any way to get ride of this tough situation? |
|
March 22, 2024, 04:28 |
|
#2 |
Senior Member
Join Date: Dec 2021
Posts: 251
Rep Power: 6 |
Hey,
If you can, share your snappyHexMeshDict, it will help people understand. The resolveFeatureAngle works the other way I believe! Meaning that to detect more edges, you have to reduce this value (set it to 30 to resolve the edges of faces making an angle sharper than 30° for instance). By setting it to 175, you are only detecting angles sharper than 175°, which is... very sharp! Try reducing it. Are you using implicit or explicit feature detection? What are your input geometry files (stl, obj...)? |
|
March 22, 2024, 04:46 |
|
#3 |
Senior Member
Yann
Join Date: Apr 2012
Location: France
Posts: 1,238
Rep Power: 29 |
This bit might help to understand the resolveFeatureAngle parameter: https://doc.openfoam.com/2306/tools/...veFeatureAngle
|
|
March 22, 2024, 06:09 |
|
#4 |
Senior Member
M
Join Date: Dec 2017
Posts: 703
Rep Power: 13 |
Looks suspiciously like a highly flat background mesh. Snappy is very bad at handling flat blockMesh cells as input. Try cubic background cells.
|
|
March 22, 2024, 08:22 |
|
#5 | |
New Member
Amirreza
Join Date: Mar 2020
Posts: 17
Rep Power: 6 |
Quote:
about resolveFeatureAngle you're right, I set includedAngle 170. I've attached my SHMDict here. |
||
March 22, 2024, 08:26 |
|
#6 | |
New Member
Amirreza
Join Date: Mar 2020
Posts: 17
Rep Power: 6 |
Quote:
I don't understand what "flat blockMesh" is, I used blockMesh as backGround mesh. would you explain more about cubic background cell? |
||
March 25, 2024, 03:23 |
|
#7 |
Senior Member
M
Join Date: Dec 2017
Posts: 703
Rep Power: 13 |
In the 2nd image looking at the defect regions it appears your background mesh cells are flat; meaning not as high (z) as they are wide (x and y extent). Snappy does work best with a uniform background mesh (x, y and z lengths identical == cubic cells).
|
|
March 26, 2024, 10:40 |
snapControls seems to be disabled!
|
#8 | |
New Member
Amirreza
Join Date: Mar 2020
Posts: 17
Rep Power: 6 |
Quote:
After trying with a cubic background cells snapControls does not work properly. I mean the edges are coarse even in high level values. I guess snapping the edges is somehow disabled!! this is my SHMDict: Code:
#includeEtc "caseDicts/mesh/generation/snappyHexMeshDict.cfg" castellatedMesh on; snap on; addLayers on; geometry { buildings.stl { type triSurfaceMesh; name buildings; } /* ground.stl { type triSurfaceMesh; name buildings; } */ refinementBox { type box; min (-256 -272.5 0); max (233.239 277.011 65); } } castellatedMeshControls { nCellsBetweenLevels 15; resolveFeatureAngle 15; features ( { file "buildings.eMesh"; level 6; } ); refinementSurfaces { buildings { level (4 4); patchInfo { type wall; } } ground { level (1 2); patchInfo { type wall; } } } refinementRegions { refinementBox { mode inside; levels ((1E15 2)); } } locationInMesh (2 0 0.2); } snapControls { nSolveIter 100; //- Maximum number of snapping relaxation //iterations. Should stop before upon //reaching a correct mesh. nRelaxIter 15; // Feature snapping //Number of feature edge snapping iterations. nFeatureSnapIter 10; explicitFeatureSnap true; implicitFeatureSnap false; } addLayersControls { layers { "CAD.*" { nSurfaceLayers 3; } } relativeSizes false; expansionRatio 1.2; featureAngle 160; finalLayerThickness 0.5; minThickness 1.8e-3; // Surface based refinement level (2 4); } meshQualityControls {} writeFlags ( noRefinement // scalarLevels // layerSets // layerFields ); mergeTolerance 1e-6; |
||
March 26, 2024, 10:58 |
|
#9 |
Senior Member
Yann
Join Date: Apr 2012
Location: France
Posts: 1,238
Rep Power: 29 |
This looks like castellatedMesh.
If you ran snappy without the -overwrite option, make sure to move the to latest time step in ParaView in order to see your final mesh. |
|
March 27, 2024, 06:03 |
* Solved
|
#10 |
New Member
Amirreza
Join Date: Mar 2020
Posts: 17
Rep Power: 6 |
||
April 20, 2024, 14:07 |
problem with increasing levels
|
#11 |
New Member
Amirreza
Join Date: Mar 2020
Posts: 17
Rep Power: 6 |
Hi after a long time
I have a problem with using snappyHexMesh for this case(p1.png). when I increase the level in castellatedMeshControls block (more than 5) snappy crashes and stop running. I don't understand the outputs because it doesn't say what the problem is explicitly!! best wishes Amirreza |
|
April 22, 2024, 04:18 |
|
#12 |
Senior Member
Yann
Join Date: Apr 2012
Location: France
Posts: 1,238
Rep Power: 29 |
Hello,
It would help to have the full snappy log file. (It is often useful to know what was going on prior to the crash) Yann |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[snappyHexMesh] Errors with snappyHexMesh and cyclic BCs for complex STL structures | DanPad07 | OpenFOAM Meshing & Mesh Conversion | 0 | July 21, 2021 12:34 |
[CAD formats] Creating waterproof STL using snappyHexMesh or salome | Tobi | OpenFOAM Meshing & Mesh Conversion | 58 | May 13, 2020 07:01 |
[snappyHexMesh] What types of stl files are needed in snappyhexmesh? | phandy | OpenFOAM Meshing & Mesh Conversion | 1 | February 19, 2015 06:36 |
[snappyHexMesh] Experimentally obtained STL file for internal Flow SnappyHexMesh | Irish09 | OpenFOAM Meshing & Mesh Conversion | 9 | April 7, 2012 09:50 |
Meshing complex white-light/GOM based STL models | jola | Main CFD Forum | 13 | January 30, 2012 02:35 |