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

[snappyHexMesh] Problems adding layers to several objects

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By Yann

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 4, 2020, 10:15
Default Problems adding layers to several objects
  #1
Member
 
Rasmus Iwersen
Join Date: Jan 2019
Location: Denmark
Posts: 81
Rep Power: 8
Rasmusiwersen is on a distinguished road
Hi all,

I am trying to add layers to four cylinders, all of which within the boundary of yPlus values, i.e. between 30 and 300. Hence hte layers should be round 0.0017 meters in the first layer.

My blockMeshDict and snappyhexMeshDict are attached, but every time i run snappyHexMeshDict, either no layers are added at all, or layer size are not equal to the one i specify in snappyHexMeshDict...

Please see attached snip and log of snappyhexMesh.

Can any of you help??
Attached Images
File Type: jpg snip.jpg (190.3 KB, 39 views)
Attached Files
File Type: txt snappyHexMeshDict.txt (12.1 KB, 9 views)
File Type: txt blockMeshDict.txt (2.6 KB, 3 views)
File Type: zip log.zip (15.6 KB, 2 views)

Last edited by Rasmusiwersen; January 4, 2020 at 19:56.
Rasmusiwersen is offline   Reply With Quote

Old   January 10, 2020, 05:03
Default
  #2
Senior Member
 
Yann
Join Date: Apr 2012
Location: France
Posts: 1,238
Rep Power: 29
Yann will become famous soon enoughYann will become famous soon enough
Hi !

I see one problem in your snappyHexMeshDict file:

Code:
    // When not to extrude surface. 0 is flat surface, 90 is when two faces
    // are perpendicular
    featureAngle 0;

With featureAngle=0, you're basically telling to snappy to not add any layer anywhere. With featureAngle=90, snappy should try to add layers on your patch, except where faces have an angle of 90° or above. So you should adjust the value depending on what you want to do, but for sure 0° will not give any layer addition.
There might be other problems but I guess you can start with this and see if it helps.

Just in case you don't know it there are different ways to define the layers thickness :

Code:
    // Layer thickness specification. This can be specified in one of following
    // ways:
    // - expansionRatio and finalLayerThickness (cell nearest internal mesh)
    // - expansionRatio and firstLayerThickness (cell on surface)
    // - overall thickness and firstLayerThickness
    // - overall thickness and finalLayerThickness
    // - overall thickness and expansionRatio

Cf the annotated snappyHexMeshDictFile

Regards,
Yann
Rasmusiwersen likes this.
Yann is offline   Reply With Quote

Old   January 10, 2020, 05:28
Default
  #3
Member
 
Rasmus Iwersen
Join Date: Jan 2019
Location: Denmark
Posts: 81
Rep Power: 8
Rasmusiwersen is on a distinguished road
Hi Yann!

First of all, thank you so much for taking the time to look at my problem. I really appreciate it!

Quote:
Originally Posted by Yann View Post
With featureAngle=0, you're basically telling to snappy to not add any layer anywhere. With featureAngle=90, snappy should try to add layers on your patch, except where faces have an angle of 90° or above. So you should adjust the value depending on what you want to do, but for sure 0° will not give any layer addition.
I actually tried changing it to e.g. 160. In addition with some other alterations made based on the guide here: http://www.wolfdynamics.com/wiki/meshing_OF_SHM.pdf I made it work. I think what tipped the scale was that I've made a refinement region in approximately the same thickness as i expect the layer to be.

Quote:
Originally Posted by Yann View Post
Just in case you don't know it there are different ways to define the layers thickness :

Code:
    // Layer thickness specification. This can be specified in one of following
    // ways:
    // - expansionRatio and finalLayerThickness (cell nearest internal mesh)
    // - expansionRatio and firstLayerThickness (cell on surface)
    // - overall thickness and firstLayerThickness
    // - overall thickness and finalLayerThickness
    // - overall thickness and expansionRatio
I wasn't aware that you can specify an overall thickness. Is that defined through "thickness 0.5" in the annotation you linked? So e.g.
relativeSizes false;
nSurfacelayers 5;
firstLayerthickness 0.01;
thickness 0.1;

would create 5 layers of either equally sized layers or use a default expansionratio?

Once again, thank you so much for your time!

/Rasmus
Rasmusiwersen is offline   Reply With Quote

Old   January 10, 2020, 06:38
Default
  #4
Senior Member
 
Yann
Join Date: Apr 2012
Location: France
Posts: 1,238
Rep Power: 29
Yann will become famous soon enoughYann will become famous soon enough
Hi Rasmus,

I'm glad if my post could help you.

Another thing you can try, for diagnosis purpose, is to switch off most of the quality controls parameters in meshQualityControls (see here to see how disable each parameters)

From my experience, layers are sometimes not extruded because it fails to satisfy the mesh quality parameters and it's hard to know if layers are not extruded because of the layer addition setup or the mesh quality controls.

So when setting up the mesh, it can be useful to disable the quality controls to have the full control on the layers addition setup, and once you're satisfied with the solution enable/adjust mesh quality parameters.


Quote:
Originally Posted by Rasmusiwersen View Post
I wasn't aware that you can specify an overall thickness. Is that defined through "thickness 0.5" in the annotation you linked? So e.g.
relativeSizes false;
nSurfacelayers 5;
firstLayerthickness 0.01;
thickness 0.1;

would create 5 layers of either equally sized layers or use a default expansionratio?
I've never tried this mode, but I think snappy should manage to compute its own expansion ratio to have a smooth transition.
If you try it, I'm interested to know how it behaves!

Yann
Yann is offline   Reply With Quote

Old   January 10, 2020, 11:57
Default
  #5
Member
 
Rasmus Iwersen
Join Date: Jan 2019
Location: Denmark
Posts: 81
Rep Power: 8
Rasmusiwersen is on a distinguished road
Hi Yann,

Quote:
Originally Posted by Yann View Post
Hi Rasmus,

I'm glad if my post could help you.

Another thing you can try, for diagnosis purpose, is to switch off most of the quality controls parameters in meshQualityControls (see here to see how disable each parameters)

From my experience, layers are sometimes not extruded because it fails to satisfy the mesh quality parameters and it's hard to know if layers are not extruded because of the layer addition setup or the mesh quality controls.

So when setting up the mesh, it can be useful to disable the quality controls to have the full control on the layers addition setup, and once you're satisfied with the solution enable/adjust mesh quality parameters.
During this proces, I've tried quite a lot of things and the meshQuality controls didn't really go haywire at any point. In my particular case, I doubt that is where the issue lies. Nevertheless, if any problem reoccurs or others arise i will definitely give this suggestion a spin.

Quote:
Originally Posted by Yann View Post
I've never tried this mode, but I think snappy should manage to compute its own expansion ratio to have a smooth transition.
If you try it, I'm interested to know how it behaves!
Alright. I'll give it a go if needs be, and post the result here in this thread. Have a great weekend!
Rasmusiwersen 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] Collapsing layers RomCFD OpenFOAM Meshing & Mesh Conversion 5 January 18, 2020 02:39
chtMultiRegionSimpleFoam: strange error samiam1000 OpenFOAM Running, Solving & CFD 26 December 29, 2015 23:14
Problems adding temperature to icoFoam sur4j OpenFOAM Programming & Development 8 January 11, 2015 02:14
Problems in my first attempt with chtMultiRegionSimpleFoam zfaraday OpenFOAM Running, Solving & CFD 1 April 8, 2014 19:20
[snappyHexMesh] fail adding layers Tensian OpenFOAM Meshing & Mesh Conversion 2 November 4, 2013 12:22


All times are GMT -4. The time now is 03:04.