CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > General Forums > Main CFD Forum

SnappyHexMesh directional refinement

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By bruce21

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 22, 2024, 06:30
Default SnappyHexMesh directional refinement
  #1
New Member
 
Sudharsan Bharatwaj
Join Date: Dec 2021
Posts: 11
Rep Power: 4
bruce21 is on a distinguished road
Hi CFD community,

I am using snappyHexMesh to refine my axisymmetric mesh (which uses a wedge boundary condition). I created this wedge domain using Gmsh. When I try refining the mesh, I see that the wedge boundaries lose their planarity. I see this is because snappy is refining the mesh in Y axis (around the axis of symmetry) also. Please see the attached dictionary file.

I need to refine the mesh only in X and Z direction, but not Y. I realized that refineMesh can do this, but the resulting mesh isn't satisfactory.

So, is there a way to specify directionality (refine only in specified axis) while using snappyHex for refinement?

Thanks in advance!
Attached Files
File Type: txt snappyHexMeshDict.txt (3.5 KB, 4 views)
bruce21 is offline   Reply With Quote

Old   November 22, 2024, 07:33
Default
  #2
Senior Member
 
Lucky
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 5,761
Rep Power: 66
LuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura about
Not in snappy, no. Snappy is not a mesher, it is a tool that makes a mesh snappy. Snappy is also not a tool for refining a mesh.

Is your domain a simple wedge? If so, return to the original blockMesh, you don't need snappy. If you have a wedge with a car inside it then:

Two other ideas you may like to try
1) Increase the resolution in the X and Z direction in the original blockMesh. Then snap it.
2) Scale the mesh in the Y direction smaller. Run snappy. Then scale the Y-dimension back up.
LuckyTran is offline   Reply With Quote

Old   November 22, 2024, 09:03
Default
  #3
Senior Member
 
M
Join Date: Dec 2017
Posts: 703
Rep Power: 13
AtoHM is on a distinguished road
The ESI version of snappyHexMesh does support directional refinement.
AtoHM is offline   Reply With Quote

Old   November 24, 2024, 14:33
Default
  #4
New Member
 
Sudharsan Bharatwaj
Join Date: Dec 2021
Posts: 11
Rep Power: 4
bruce21 is on a distinguished road
Quote:
Originally Posted by LuckyTran View Post
Not in snappy, no. Snappy is not a mesher, it is a tool that makes a mesh snappy. Snappy is also not a tool for refining a mesh.

Is your domain a simple wedge? If so, return to the original blockMesh, you don't need snappy. If you have a wedge with a car inside it then:

Two other ideas you may like to try
1) Increase the resolution in the X and Z direction in the original blockMesh. Then snap it.
2) Scale the mesh in the Y direction smaller. Run snappy. Then scale the Y-dimension back up.

Hi LukcyTran,

I don't have an object for thr mesh to snap on. But, I created the mesh using GmsH and it's kind of a hard deal to do add refinement regions by manually creating blocks (which you probably already know). That is why I wanted to use a refinement utility within openfoam.

However, thanks for the suggestions. I will go back to using a blockMesh and try out these methods if I couldn't find a (easier) solution soon.
bruce21 is offline   Reply With Quote

Old   November 24, 2024, 14:37
Default
  #5
New Member
 
Sudharsan Bharatwaj
Join Date: Dec 2021
Posts: 11
Rep Power: 4
bruce21 is on a distinguished road
Quote:
Originally Posted by AtoHM View Post
The ESI version of snappyHexMesh does support directional refinement.
Hi AtoHM,

Thanks for the reply! That's good news . If possible, can you share a sample snappyHex dict file with the directional refinement classes in it? I'll try installing the ESI version and give it a try.
bruce21 is offline   Reply With Quote

Old   November 25, 2024, 06:33
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,

Here are the release notes when directional refinement has been introduced in OpenFOAM-v1806:
https://www.openfoam.com/news/main-n...pre-processing

A stretching feature also appeared in the next release (OpenFOAM-v1812):
https://www.openfoam.com/news/main-n...pre-processing

Any version from ESI released after v1812 should have these features.

Last edited by Yann; November 25, 2024 at 09:22. Reason: typo
Yann is offline   Reply With Quote

Old   November 25, 2024, 08:11
Lightbulb
  #7
New Member
 
Sudharsan Bharatwaj
Join Date: Dec 2021
Posts: 11
Rep Power: 4
bruce21 is on a distinguished road
Quote:
Originally Posted by Yann View Post
Hello,

Here is the release notes when directional refinement has been introduced in OpenFOAM-v1806:
https://www.openfoam.com/news/main-n...pre-processing

A stretching feature also appeared in the next release (OpenFOAM-v1812):
https://www.openfoam.com/news/main-n...pre-processing

Any version from ESI released after v1812 should have these features.
Hi Yann,

That is superb! Thank you so much for the link. On first glance, it looks like that is exactly what I was looking for.
Yann likes this.
bruce21 is offline   Reply With Quote

Reply

Tags
axisymmetric, openfoam, snappyhexmesh, wedge mesh axisymmetric


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 sticking point natty_king OpenFOAM Meshing & Mesh Conversion 11 February 20, 2024 10:12
[snappyHexMesh] SnappyHexMesh running killed! Mark JIN OpenFOAM Meshing & Mesh Conversion 7 June 14, 2022 02:37
SimpleFoam & Theater jipai OpenFOAM Running, Solving & CFD 3 June 18, 2019 11:11
killed "snappyHexMesh" parkh32 OpenFOAM Pre-Processing 2 April 8, 2012 18:12
[snappyHexMesh] snappyHexMesh aborting Tobi OpenFOAM Meshing & Mesh Conversion 0 November 10, 2010 04:23


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