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

[snappyHexMesh] Refinement box dimension changes automatically

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 3, 2017, 07:52
Default Refinement box dimension changes automatically
  #1
Member
 
Vignesh Rajendiran
Join Date: Aug 2016
Location: Chennai, India
Posts: 62
Rep Power: 9
Vignesh2508 is on a distinguished road
Hello Guys,

I have a problem with fixing the refinement box dimension since it is changing automatically. I do not know why snappyhexmesh is showing this behaviour.

I was conducting a mesh independence study where i have to increase the number of cells and check the changes in the coefficient of drag and arrive at a better mesh. But when i tried to increase the number in the base mesh(i.e the blockmesh) the final mesh after the SHM is not what i expect. That is the dimension of the refinement box is changing after i mesh using SHM. I have attached the picture of the picture of the mesh i obtained. And i have also the snappyhexmeshdict file along for reference.

Please take a look at the picture and help me out in figuring out the reason for this strange behaviour.

Thanks in advance

Vicky
Attached Images
File Type: jpg snappy.jpg (183.6 KB, 53 views)
Attached Files
File Type: txt snappyHexMeshDict.txt (11.5 KB, 15 views)
Vignesh2508 is offline   Reply With Quote

Old   April 11, 2017, 03:55
Default
  #2
Senior Member
 
Join Date: Aug 2013
Posts: 407
Rep Power: 15
Antimony is on a distinguished road
Hi,

I don't quite understand what you mean by sHM changing the dimensions of your refinement region.

What I noticed was that your maxGlobalCells is quite low, only at 2e6. Are you sure with all the levels of refinement you have specified, 2e6 cells will be enough?

It is possible that refinement does not happen according to how you expect it because it hits this limit early.

Hope this helps.

Cheers,
Antimony
Antimony is offline   Reply With Quote

Old   April 11, 2017, 04:01
Default
  #3
Member
 
Vignesh Rajendiran
Join Date: Aug 2016
Location: Chennai, India
Posts: 62
Rep Power: 9
Vignesh2508 is on a distinguished road
Yeah i figured that the max global cells was low and then changed it. Now its working properly.

Even then I was wondering that the SHM should stop and give me an error if it detects that max global cells is low. It used to do it when i was using openfoam 3.0.1 but in openfoam 4, if you can see the image you can notice that the refinement box was not what i mentioned in the SHM dict.

Am i wrong in my assumption that the process will be killed and a error will be displayed if i do not provide a good number of maxGlobcells.

Thanks

Vicky
Vignesh2508 is offline   Reply With Quote

Old   April 11, 2017, 21:30
Default
  #4
Senior Member
 
Join Date: Aug 2013
Posts: 407
Rep Power: 15
Antimony is on a distinguished road
Hi,

sHM to the best of my knowledge has never terminated if the number of maxGlobalCells is low, as it assumes that the user knows what exactly he/she wants when specifying it in the sHMDict file.

In my opinion, that approach by sHM is logical. After all, there are a myriad number of ways in which you might want to run sHM and terminating when your maxGlobalCells is deemed too low, can be incorrect. As an extreme example, if I wanted to use sHM to simply remove cells intersected by surfaces and have a very fine blockMesh whose cell count exceeds sHM's maxGlobalCells, why should sHM terminate with an error?

As far as I understand it, it is best to ensure that when sHM works, it never reaches that maxGlobalCells limit. The minute it does, there is always going to be the chance that the mesh has been insufficiently refined. Remember that the final mesh count from sHM can be much lower than the maxGlobalCells, once it removes cells that have been intersected by the surface.

Hope this clarifies.

Cheers,
Antimony
Antimony is offline   Reply With Quote

Old   April 12, 2017, 01:37
Default
  #5
Member
 
Vignesh Rajendiran
Join Date: Aug 2016
Location: Chennai, India
Posts: 62
Rep Power: 9
Vignesh2508 is on a distinguished road
Thank you.

Right now I am trying to add layers to my model in sHM. Do you know if there is any tool where I can determine the final layer thickness and expansion ratio for the layer addition process for a required y+. Or do I have do it in the traditional way of calculating them through the 'estimated wall distance'?

As you can see from my sHM dict file I have tried to add 10 layers and when I try to increase the layers to a number of 20, something happens and all the layers are collapsed and I can not see the layers after meshing. Do you know why sHM shows this behavior?

Thanks

Vicky
Vignesh2508 is offline   Reply With Quote

Old   April 25, 2017, 06:45
Default
  #6
Senior Member
 
KaLium's Avatar
 
Kal-El
Join Date: Apr 2017
Location: Finland
Posts: 150
Rep Power: 9
KaLium is on a distinguished road
Quote:
Originally Posted by Antimony View Post
Hi,

sHM to the best of my knowledge has never terminated if the number of maxGlobalCells is low, as it assumes that the user knows what exactly he/she wants when specifying it in the sHMDict file.
Agreed. If maxGlobalCells is too low, sHM skips some of the refiments.
KaLium 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
Free Surface Ship Flow timfranke OpenFOAM Running, Solving & CFD 322 March 3, 2021 09:04
[snappyHexMesh] Error snappyhexmesh - Multiple outside loops avinashjagdale OpenFOAM Meshing & Mesh Conversion 53 March 8, 2019 09:42
[snappyHexMesh] sHM refinement away from surface nholt OpenFOAM Meshing & Mesh Conversion 1 June 14, 2016 14:36
[snappyHexMesh] Edge refinement ashghan OpenFOAM Meshing & Mesh Conversion 4 May 13, 2014 05:45
Hexpress: Refinement Box definition timfranke Fidelity CFD 1 January 16, 2014 10:18


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