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

[snappyHexMesh] Problem with sHM addLayer

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 15, 2019, 09:34
Default Problem with sHM addLayer
  #1
Member
 
Joe lee
Join Date: Nov 2018
Posts: 59
Rep Power: 7
Jinjolee is on a distinguished road
In sMH, I have the addLayersControls part shown as follow:

Code:
addLayersControls
{
    relativeSizes false;
    layers
    {
	"figure.*"
        {
            nSurfaceLayers 5;
        }
    }
    expansionRatio 1.2;
    firstLayerThickness 0.055;
    minThickness 0.055;
    nGrow 0;
    featureAngle 10;
    slipFeatureAngle 30;
    nRelaxIter 3;
    nSmoothSurfaceNormals 1;
    nSmoothNormals 3;
    nSmoothThickness 10;
    maxFaceThicknessRatio 0.5;
    maxThicknessToMedialRatio 0.3;
    minMedianAxisAngle 90;
    nBufferCellsNoExtrude 0;
    nLayerIter 15;
}
However, the mesh generated looks like:


First, it seems that it does not generate 5 layers as I defined in the above code.
Second, in the chest and the back areas of the cyclist body, it seems that the layer does not generate properly.

What could be the cause of this issue? Is my setting inappropriate? Thanks.

BTW, are those "ropes" near the middle of the bike frame normal? Or does that indicates a bad quality of meshing? Thanks again
Jinjolee is offline   Reply With Quote

Old   April 17, 2019, 04:03
Default
  #2
Member
 
Join Date: Nov 2014
Posts: 92
Rep Power: 11
hokhay is on a distinguished road
First of all, SHM does not usually generate 100% boundary layer mesh because it is depending on the mesh quality that it generates. If the SHM finds that the layer mesh is poor in quality, it will stop the extrusion. The most important parameter is the firstLayerThickenss. The value in your setting is obviously too high, 0.055m. I would suggest you start from 0.005 to see if it generate more layers.
hokhay is offline   Reply With Quote

Old   April 17, 2019, 07:45
Default
  #3
Member
 
Joe lee
Join Date: Nov 2018
Posts: 59
Rep Power: 7
Jinjolee is on a distinguished road
Quote:
Originally Posted by hokhay View Post
First of all, SHM does not usually generate 100% boundary layer mesh because it is depending on the mesh quality that it generates. If the SHM finds that the layer mesh is poor in quality, it will stop the extrusion. The most important parameter is the firstLayerThickenss. The value in your setting is obviously too high, 0.055m. I would suggest you start from 0.005 to see if it generate more layers.
Thanks for your advice. I actually have another post which I had problem after changing the firstLayerThickness to 0.001m. It is here: How to add a fine boundary layer. Could you please help me look into that issue? Thanks a lot!

Another thing I would like to ask is that you said the mesh quality is one of the dependent factor where boundary layer mesh could be generated, does that mean my mesh refinement before generating the boundary layer has to be good? For example, instead of having my refinementSurfaces level of 4, I should change it to 8? Thanks.
Jinjolee is offline   Reply With Quote

Old   April 17, 2019, 11:51
Default
  #4
Member
 
Join Date: Nov 2014
Posts: 92
Rep Power: 11
hokhay is on a distinguished road
Yes, the mesh quality must be good before boundary layer mesh generated. The size of the surface mesh and the boundary layer mesh has a "magic" ratio, you need to try and error. Let's say your surface mesh size is 0.1m, your boundary layer mesh size cannot be 0.001m. My usual settings have background mesh of 0.1m, surfaceRefinement is 7 level and firstLayer at 1e-4 and i only do 6 layers. You need to try out the parameters. I have many times to achieve more than 10 layers but no success.
hokhay is offline   Reply With Quote

Old   April 18, 2019, 02:27
Default
  #5
Member
 
Joe lee
Join Date: Nov 2018
Posts: 59
Rep Power: 7
Jinjolee is on a distinguished road
Quote:
Originally Posted by hokhay View Post
Yes, the mesh quality must be good before boundary layer mesh generated. The size of the surface mesh and the boundary layer mesh has a "magic" ratio, you need to try and error. Let's say your surface mesh size is 0.1m, your boundary layer mesh size cannot be 0.001m. My usual settings have background mesh of 0.1m, surfaceRefinement is 7 level and firstLayer at 1e-4 and i only do 6 layers. You need to try out the parameters. I have many times to achieve more than 10 layers but no success.
Thanks for your reply. May I know how long do you take to successfully generate mesh with boundary layers? I change all refinement level to 8, and it takes more than 10 hours and it is still running. I use Ryzen 5 2400G, 16GB DDR4 RAM, GT 1030.
Jinjolee is offline   Reply With Quote

Old   April 18, 2019, 06:47
Default
  #6
Member
 
Join Date: Nov 2014
Posts: 92
Rep Power: 11
hokhay is on a distinguished road
It's a complicated question, it is not hard to generate the mesh but it is hard to generate boundary layer on the whole surface, basically it is impossible. Usually i look for 80% surface converage with layer mesh. I just spend half day tuning the settings today and i am using a 32 cores server and my case has just 4 millions cells.
I think level 8 is too much. How many cells are you generating with these settings? It really cannot do much with 4 cores CPU. 10 hours on meshing is too much
hokhay is offline   Reply With Quote

Old   April 18, 2019, 09:28
Default
  #7
Member
 
Joe lee
Join Date: Nov 2018
Posts: 59
Rep Power: 7
Jinjolee is on a distinguished road
Quote:
Originally Posted by hokhay View Post
It's a complicated question, it is not hard to generate the mesh but it is hard to generate boundary layer on the whole surface, basically it is impossible. Usually i look for 80% surface converage with layer mesh. I just spend half day tuning the settings today and i am using a 32 cores server and my case has just 4 millions cells.
I think level 8 is too much. How many cells are you generating with these settings? It really cannot do much with 4 cores CPU. 10 hours on meshing is too much
I am not sure how many cell did it exactly generate, but for the last check on the log.snappyHexMesh file, it seems to be generating 10M cells during iteration 36. I terminated it though. I would try to decrease the level a bit and run again. Thank you very much.
Jinjolee is offline   Reply With Quote

Old   April 18, 2019, 12:35
Default
  #8
Member
 
Join Date: Nov 2014
Posts: 92
Rep Power: 11
hokhay is on a distinguished road
Quote:
Originally Posted by Jinjolee View Post
I am not sure how many cell did it exactly generate, but for the last check on the log.snappyHexMesh file, it seems to be generating 10M cells during iteration 36. I terminated it though. I would try to decrease the level a bit and run again. Thank you very much.
You can use checkMesh to see the mesh number. 10M cells are probably to much for your CPU but 10 hours of meshing still sound too long time. Are you running in parallel?
hokhay is offline   Reply With Quote

Old   April 18, 2019, 13:55
Default
  #9
Member
 
Joe lee
Join Date: Nov 2018
Posts: 59
Rep Power: 7
Jinjolee is on a distinguished road
Quote:
Originally Posted by hokhay View Post
You can use checkMesh to see the mesh number. 10M cells are probably to much for your CPU but 10 hours of meshing still sound too long time. Are you running in parallel?
Yes I am running in parallel. I am not sure if it is really 10M, but when I checked for the computer resource at the time, my RAM is been 100% used, and even my C drive got 100%, I guess it is used as an extra memory. It seems that my memory is so limited that result in a long computational time. Also, I guess it may due to the change of some of the settings. For example, I changed nCellsBetweenLevels to 4, nSolverIter to 50, and resolveFeatureAngle to 10.

I am now doing a new simulation with all refinement settings of level 6. It tooks 5257.93s to complete the mesh. Yet I could not take a look into the mesh now, since simpleFoam is still in progress.

I will update it after the simulation completed. Thanks a lot for your help.
Jinjolee is offline   Reply With Quote

Reply

Tags
addlayercontrols, snappyhexmesh


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
Heat Transfert, mixing problem Wazdq CFX 8 November 7, 2016 05:44
Gambit - meshing over airfoil wrapping (?) problem JFDC FLUENT 1 July 11, 2011 05:59
[snappyHexMesh] SHM add layers problem doubtsincfd OpenFOAM Meshing & Mesh Conversion 0 June 6, 2011 12:01
natural convection problem for a CHT problem Se-Hee CFX 2 June 10, 2007 06:29
Adiabatic and Rotating wall (Convection problem) ParodDav CFX 5 April 29, 2007 19:13


All times are GMT -4. The time now is 10:53.