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

SnappyHexMesh add layers

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 12, 2024, 12:49
Default SnappyHexMesh add layers
  #1
New Member
 
Hongbin Wang
Join Date: Feb 2020
Posts: 20
Rep Power: 6
Origami is on a distinguished road
I am modelling an urban area with buildings on non-flat terrain. I want to add layers to the surface of buildings and terrains. Below the log file of running snappyHexMesh. I don’t understand what it means for “layers”, “overall [m]” and “thickness [%]”. Can someone please help?

patch faces layers overall thickness
[m] [%]
----- ----- ------ --- ---
buildingSurroundings 9147 2.14 0.138 68.9
innerTerrain 583214 0.00712 0.00303 0.163

Below an excerpt of snappyHexMeshDict for adding layers.

addLayersControls
{
minMedialAxisAngle 90;
relativeSizes true;
layers
{
buildingSurroundings
{
nSurfaceLayers 3;
relativeSizes true;
minThickness 0.1;
finalLayerThickness 0.6;
expansionRatio 1.1;
}
innerTerrain
{
nSurfaceLayers 4;
relativeSizes false;
minThickness 0.2;
firstLayerThickness 0.4;
expansionRatio 1.1;
}
}
expansionRatio 1.2;
firstLayerThickness 1;
minThickness 0.3;
nGrow 0;
featureAngle 130;
nRelaxIter 5;
nSmoothSurfaceNormals 1;
nSmoothNormals 3;
nSmoothThickness 10;
maxFaceThicknessRatio 0.5;
maxThicknessToMedialRatio 0.3;
minMedianAxisAngle 90;
nBufferCellsNoExtrude 0;
nLayerIter 50;
nRelaxedIter 20;
}
Origami is offline   Reply With Quote

Old   March 12, 2024, 14:14
Default
  #2
Senior Member
 
Lucky
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 5,675
Rep Power: 66
LuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura about
there is something wrong with your log output, maybe a copy and past error

Code:
patch                        faces    layers   overall     thickness
                                                   [m]       [%]
-----                         -----        ------    ---              ---
this tells you the format of the following outputted lines

buildingSurroundings 9147 2.14 0.138 68.9
innerTerrain 583214 0.00712 0.00303 0.163


buildingSurroundings is the patch 9147 is the number of faces. 3 numbers should follow. A number of layers, an overall thickness of the layers in [m] and an overall thickness of the layers in %


in the next line
innerTerrain is the patch, it has 583214 faces, 0.00712 layers apparently


The last percentage is the percentage of the patch that has been layered. 100% means every face on the patch has a layer.
LuckyTran is offline   Reply With Quote

Old   March 13, 2024, 07:48
Default
  #3
New Member
 
Hongbin Wang
Join Date: Feb 2020
Posts: 20
Rep Power: 6
Origami is on a distinguished road
Hi LuckyTran,
Thanks very much for your response.
I attached the log.snappyHexMesh and snappyHexMesh.
I don't think I made copy paste error for the log file.
Thanks.
Attached Files
File Type: zip log.zip (9.5 KB, 0 views)
File Type: zip snappyHexMeshDict.zip (4.2 KB, 0 views)
Origami is offline   Reply With Quote

Old   March 13, 2024, 13:14
Default
  #4
Senior Member
 
Lucky
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 5,675
Rep Power: 66
LuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura about
It doesn't really matter whether you did or not, your question is answered
LuckyTran is offline   Reply With Quote

Old   March 13, 2024, 16:26
Default
  #5
New Member
 
Hongbin Wang
Join Date: Feb 2020
Posts: 20
Rep Power: 6
Origami is on a distinguished road
I'm not grasping it yet. The surface of buildingSurroundings has a Layers value of 2.14. However, in sappyHexMesh, 3 layers are specified. What is the “overall”, is it the total height of the 3 layers 0.138m? It doesn’t seem to make sense. Additionally, the term "thickness (%)" seems misleading since it refers to the percentage of all faces being layered, which doesn't seem to align with its name.

Patch faces layers overall([m]) thickness(%)

----- ----- ------ --- ---
buildingSurroundings 9147 2.14 0.138 68.9
innerTerrain 583214 0.00712 0.00303 0.163

Last edited by Origami; March 13, 2024 at 16:41. Reason: formating
Origami is offline   Reply With Quote

Old   March 14, 2024, 07:57
Default
  #6
Senior Member
 
Lucky
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 5,675
Rep Power: 66
LuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura about
it's actually overall thickness [m] and just a plain unlabeled %

You are arguing pedantics. If you don't agree with it, then simply change it. OpenFOAM is meant to be modifiable, that's why they give you the source code.

It's also just a report. You can just open the mesh and look at it and verify with your own eyeballs what the mesh looks like. Take a picture, screenshot it, whatever.
LuckyTran is offline   Reply With Quote

Old   March 14, 2024, 10:01
Default
  #7
New Member
 
Hongbin Wang
Join Date: Feb 2020
Posts: 20
Rep Power: 6
Origami is on a distinguished road
Ok. Thanks for the tip. I'll look at the source code and see if I can crack the code of understanding.
Origami 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] SnappyHexMesh add Layer Only failed fxzf OpenFOAM Meshing & Mesh Conversion 1 January 11, 2023 04:14
[snappyHexMesh] Add layers at the bottom of a mesh chayoun OpenFOAM Meshing & Mesh Conversion 5 June 2, 2021 11:35
[snappyHexMesh] Inconsistent Layers SnappyHexMesh CfdUser5855 OpenFOAM Meshing & Mesh Conversion 0 March 10, 2021 13:42
[snappyHexMesh] Snappy add layers failed mqsim OpenFOAM Meshing & Mesh Conversion 1 January 24, 2021 15:02
[snappyHexMesh] snappyHexMesh fails adding layers biscarri OpenFOAM Meshing & Mesh Conversion 13 March 21, 2020 12:40


All times are GMT -4. The time now is 12:42.