CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Meshing & Mesh Conversion (https://www.cfd-online.com/Forums/openfoam-meshing/)
-   -   [snappyHexMesh] How to add one surface layer at a time? (https://www.cfd-online.com/Forums/openfoam-meshing/239123-how-add-one-surface-layer-time.html)

saladbowl October 21, 2021 10:30

How to add one surface layer at a time?
 
I am learning how to use snappyHexMesh and in some threads it is recommended to add one surface layer at a time. I am adding the first surface layer with the settings:

Code:

relativeSizes false;
expansionRatio 1.1;
firstLayerThickness 0.005;
minThickness 0.001;
nSurfaceLayers 1;



Given that I want, for example, 6 layers: should I simply run snappyHexMesh again with nSurfaceLayers 2? Then 3, 4, 5, and 6?

Or should I run the first time with:

run 1

Code:

relativeSizes false;
expansionRatio 1.1;
overallThickness 0.03857805;
minLayerThickness 0.001;
nSurfaceLayers 1;


followed by 5 runs with successive settings changing only the parameter overallThickness to the following values:

run 2

Code:

overallThickness 0.0305255;
run 3

Code:

overallThickness 0.023205;
run 4

Code:

overallThickness 0.01655;
run 5

Code:

overallThickness 0.0105;
run 6

Code:

overallThickness 0.005;
Any guidance is highly appreciated.

saladbowl October 21, 2021 16:05

I'm going to go ahead and answer my own question since I tried it out on a tutorial by the people over at Wolf Dynamics (http://www.wolfdynamics.com/wiki/101SHM.tar.gz). Basically the second option above should work. Instead of specifying the overallThickness and expansionRatio, I used firstLayerThickness and expansionRatio. Since one layer is added at a time, this should not make a difference.

I should note that at the addition of each additional layer, the polyMesh folder in constant/polyMesh should be replaced by the polyMesh folder generated in the time folder by the previous layer addition.

No layers

First layer added

Second layer added

Third layer added

All layers added at once

saladbowl October 26, 2021 18:57

Added clarification
 
When giving the advice above I was using OpenFOAM 8 in serial. More recently I was able to generate successive surface layers in parallel with OpenFOAM v2012 by the same procedure, but without any need to replace the polyMesh folder. Within each processor directory a new time folder is created for every run of snappyHexMesh. In the end I get a series of time folders with an increasing number of surface layers.


All times are GMT -4. The time now is 17:44.