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

[snappyHexMesh] snappyHexMesh: Bad snapping on shallow slopes

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 6, 2016, 06:44
Default snappyHexMesh: Bad snapping on shallow slopes
  #1
New Member
 
Matthias D
Join Date: Mar 2016
Posts: 11
Rep Power: 10
matthiasd is on a distinguished road
Hi,

I try to mesh a digital elevation model with snappyHexMesh (SHM). On first sight I get a good enough mesh: I can add layers and I can run my simulation without errors.

But in the second step of SHM I get small and bad cells at those areas on shallow slopes where there is a transition from one block layer to another. As this is a bit hard to explain, here are some pictures:

Those steps in the image above are from the first step of SHM and are to be expected I guess. The size of 1 block is 50m and the altitude difference on this slope between those two steps is also 50m.

In the second step of SHM I expect those steps to be snapped to the actual sloping surface in order to get a smooth, terrain following surface. And I do get a smooth surface, but the cells above those steps look very bad and seem to get quite small.
You can see this in this slice through the internal cells, with the bottom below:


Seen from above you can identify all the previous steps by those bands of non-quadratic faces.



This is actual a problem for my simulation, as those cells increase my wind velocity above the surface, which can be seen here:




I know I have seen this behavior in another thread somewhere around here. But unfortunately I can not find it anymore. Does anyone of you know what the problem might be? Of course I tried different snappyHexMesh settings and quality thresholds , but so far without success. My best guess is to tune the minVolRatio and the minVol parameter. And if I do this in a really strict way (say minVol to 1e4), then I get rid of those small cells above the surface, but end up with an actual step in my surface patch.

Any help, suggestions or further comments are welcome!

Thanks,
Matthias
Attached Images
File Type: jpg block_jumps.jpg (203.4 KB, 220 views)
File Type: png mit_slice.png (47.7 KB, 206 views)
File Type: png ohne_slice.png (133.0 KB, 204 views)
File Type: jpg u_high.jpg (114.1 KB, 203 views)
File Type: jpg u_oben.jpg (195.3 KB, 203 views)
matthiasd is offline   Reply With Quote

Old   December 6, 2016, 06:44
Default
  #2
New Member
 
Matthias D
Join Date: Mar 2016
Posts: 11
Rep Power: 10
matthiasd is on a distinguished road
Attached here you will also find my snapControls from the SHM-Dict and the quality settings I used most recently.
Attached Files
File Type: txt snapCOntrols.txt (2.3 KB, 20 views)
File Type: txt meshQualityDictSnap.txt (2.9 KB, 14 views)
matthiasd is offline   Reply With Quote

Old   December 12, 2016, 16:48
Default
  #3
New Member
 
Matthias D
Join Date: Mar 2016
Posts: 11
Rep Power: 10
matthiasd is on a distinguished road
I still couldn't solve my problem.
So far I tried several different quality settings for the snap part of SHM. I mainly focused on
- minVol
- minArea
- minVolRatio

as those seem to be the most reasonable adjustments.

But maybe you have different suggestions for certain settings?
Or do you need further information?
I might not have explained my problem clear enough. If that is the case, please let me know as well!

Cheers
matthiasd is offline   Reply With Quote

Old   December 15, 2016, 09:22
Default
  #4
New Member
 
Matthias D
Join Date: Mar 2016
Posts: 11
Rep Power: 10
matthiasd is on a distinguished road
I still did not find a solution. But I have some more pictures :-)

Those screenshots show a small area of my terrain-mesh from below! So you basically see the first mesh layer, which should follow the terrain. In color I indicate the volume of the respective cell.
The volume is calculated in Paraview with "PythonCalculator" -> "volume(inputs[0])".
The maximum volume is 125000m³ (50x50x50m)

The first picture shows the result when I use the SHM setting "minVol=1e3":


The second picture shows the result for "minVol=1e4":



As you can see, if I use "minVol"=1e3, I get small cells with even negative volume. But "checkMesh" says volumes are alright and not negative!
Not sure where this discrepancy comes from...

If I use "minVol"=1e4, my cell volumes are ok/positive, but I end up with this unwanted step in the terrain...


Did anybody experience something similar so far?
Attached Images
File Type: jpg vol1e3.jpg (52.8 KB, 185 views)
File Type: jpg vol1e4.jpg (57.2 KB, 188 views)
matthiasd is offline   Reply With Quote

Old   January 10, 2017, 03:33
Default
  #5
Member
 
Join Date: Nov 2009
Posts: 56
Rep Power: 17
fusij is on a distinguished road
Whart does checkmesh -allGeometry -allTopology report?
Tuning parameters can fine tune your mesh but it will not solve major issues.

Sent from my SM-G920F using CFD Online Forum mobile app
fusij is offline   Reply With Quote

Old   February 1, 2017, 18:23
Default
  #6
Super Moderator
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Bad Wörishofen
Posts: 2,711
Blog Entries: 6
Rep Power: 52
Tobi has a spectacular aura aboutTobi has a spectacular aura aboutTobi has a spectacular aura about
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
Hi,

I don't see negative volume cells. Negative volume cells are related to wrong oriented faces. Even minVol should be somehow in e-6 (dont know the value out of the box). However, I do not get your point right now. As far as I understand it, the problem is based on wrong / none sufficient snapping? For a better analysis you should provide the case.

Sent from my HTC One mini using CFD Online Forum mobile app
__________________
Keep foaming,
Tobias Holzmann
Tobi 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] snappyHexMesh not snapping to cylinder end wildfire230 OpenFOAM Meshing & Mesh Conversion 0 March 1, 2019 13:09
[snappyHexMesh] snappyHexMesh Parallel bad size error andrewpomeroy OpenFOAM Meshing & Mesh Conversion 2 April 2, 2018 02:08
[snappyHexMesh] SnappyHexMesh : snapping not matching surface Awak OpenFOAM Meshing & Mesh Conversion 4 May 31, 2016 09:23
[snappyHexMesh] SnappyHexMesh bad snapping for 2D airfoil maero21 OpenFOAM Meshing & Mesh Conversion 4 October 18, 2013 15:18
Problems of Duns Codes! Martin J Main CFD Forum 8 August 15, 2003 00:19


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