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

[snappyHexMesh] Refinement inside a Cylinder and Layer Improvement

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By highpressure

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 20, 2024, 08:59
Default Refinement inside a Cylinder and Layer Improvement
  #1
New Member
 
Ilyes SAYAD
Join Date: Jul 2021
Posts: 22
Rep Power: 5
highpressure is on a distinguished road
Hello everyone,


I am encountering some difficulties with snappyHexMesh and would appreciate your help. I am working on a CFD simulation involving a cylinder with a three-blade geometry inside. I have attached some screenshots of my current mesh, as well as a reference image from a thesis showing the desired mesh refinement.


  1. Refinement in the Cylinder: I am trying to achieve a more refined and structured mesh inside the cylinder, similar to what you can see in the reference image of the three-blade geometry (attached file from a thesis). However, I am not satisfied with the current result in my mesh and am unsure about the exact parameters to adjust in the snappyHexMesh configuration file to obtain a finer and more uniform mesh around the blades.
  2. Improvement of Layers: As you can see in the screenshots of the layers, I am uncertain about the quality of these layers for a CFD simulation. Can you give me your opinion on the acceptability of these layers and any advice on how to improve them?


Here the attached files:

  • Reference Image (desired mesh): Screenshot of the desired mesh and the corresponding snappyHexMesh file.
  • My current mesh: Screenshots of my current mesh and my snappyHexMesh file.


Thank you in advance for your assistance !

Best regards,
Attached Images
File Type: png Layers.png (171.7 KB, 32 views)
File Type: jpg Mesh_comparaison.jpg (170.8 KB, 34 views)
Attached Files
File Type: zip Snappyhexmesh_files.zip (56.8 KB, 8 views)
highpressure is offline   Reply With Quote

Old   June 20, 2024, 10:13
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
Hello Ilyes,

It looks like you could add a bit of refinement on your blades and inside your rotating zone. So basically increase the refinement levels.

For instance for the blades

Code:
        savonius
        {
            level (5 5);
        }
And for the volume:

Code:
        refinementCylinder
        {
            mode inside;
            levels ((1e15 4));
        }
Regards,
Yann
Yann is offline   Reply With Quote

Old   June 25, 2024, 07:27
Default
  #3
New Member
 
Ilyes SAYAD
Join Date: Jul 2021
Posts: 22
Rep Power: 5
highpressure is on a distinguished road
Hello Yann,


Thank you for your response. Attached is a screenshot of the mesh after applying your suggestions. It is still not uniform.


Is there a way to force SnappyHexMesh to generate hexahedrons only in a certain domain?


Does a mesh need to be "aesthetically pleasing"?


Thanks in advance,
Attached Images
File Type: jpg Capture d’écran du 2024-06-25 11-51-23.jpg (185.3 KB, 35 views)
highpressure is offline   Reply With Quote

Old   June 25, 2024, 12:22
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
Hello Ilyes,

The square pattern is a bit weird, I don't really see what could cause it. Could you share your snappyHexMeshDict and snappy log?


Quote:
Originally Posted by highpressure View Post
Is there a way to force SnappyHexMesh to generate hexahedrons only in a certain domain?

Does a mesh need to be "aesthetically pleasing"?
Not sure to understand your question. Snappy creates hex-dominant meshes, and split cells to refine mesh and snap it onto the geometry.

Please note the lines visible on your screenshot are only a matter of visualization in ParaView (see here for instance: do Squiggles in snappyHexMesh effect quality)
You can also uncheck the "decompose polyhedra" option when loading your case in ParaView. (cfMesh noisy mesh)
Yann is offline   Reply With Quote

Old   June 26, 2024, 05:14
Default
  #5
New Member
 
Ilyes SAYAD
Join Date: Jul 2021
Posts: 22
Rep Power: 5
highpressure is on a distinguished road
Bonjour Yann,


Thank you for your answer.


Quote:
Originally Posted by Yann View Post
The square pattern is a bit weird, I don't really see what could cause it. Could you share your snappyHexMeshDict and snappy log?

I've attached the snappyHexMeshDict, snappy log, and case file. I think the blockMesh might be a significant factor. Any advice on the required refinement level would be appreciated.



Quote:
Originally Posted by Yann View Post
Not sure to understand your question. Snappy creates hex-dominant meshes, and split cells to refine mesh and snap it onto the geometry.

Please note the lines visible on your screenshot are only a matter of visualization in ParaView (see here for instance: do Squiggles in snappyHexMesh effect quality)
You can also uncheck the "decompose polyhedra" option when loading your case in ParaView. (cfMesh noisy mesh)


By "aesthetically pleasing," I meant a uniform mesh without visible lines. I tried your suggestions and removed the lines in ParaView ! but the square patterns remain.


Best,
Ilyes
Attached Files
File Type: zip Log_and_Dict.zip (16.6 KB, 2 views)
File Type: zip Case_file.zip (65.3 KB, 2 views)
highpressure is offline   Reply With Quote

Old   June 26, 2024, 06:27
Default
  #6
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
Hello,

Snappy is reaching the cell number limit defined in the maxGlobalCells parameter in snappyHexMeshDict, as you can see in the log file:

Code:
Shell refinement iteration 3
----------------------------

No cells marked for refinement since reached limit 5000000.
This might be why you don't get a proper volume refinement with these square patterns. Try increasing the maxGlobalCells and maxLocalCells.
Yann is offline   Reply With Quote

Old   July 10, 2024, 04:48
Default
  #7
New Member
 
Ilyes SAYAD
Join Date: Jul 2021
Posts: 22
Rep Power: 5
highpressure is on a distinguished road
Hello Yann,


It works fine ! Thanks a lot for your help.


Regards,
Yann likes this.
highpressure 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] Cant manage to refine a cylinder with snappyhexmesh. samwise14 OpenFOAM Meshing & Mesh Conversion 4 October 3, 2022 09:08
[snappyHexMesh] layer not added Rasmusiwersen OpenFOAM Meshing & Mesh Conversion 1 January 2, 2020 10:43
[snappyHexMesh] Problem airfoil snappyhexmesh add layer bye bye my blue OpenFOAM Meshing & Mesh Conversion 1 May 5, 2017 06:56
[snappyHexMesh] Layers:problem with curvature giulio.topazio OpenFOAM Meshing & Mesh Conversion 10 August 22, 2012 10:03
[snappyHexMesh] Boundary layer generation problems ivan_cozza OpenFOAM Meshing & Mesh Conversion 0 October 6, 2010 14:47


All times are GMT -4. The time now is 09:49.