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

[snappyHexMesh] Old and busted: snappyHexMesh and add layers with edges

Register Blogs Community New Posts Updated Threads Search

Like Tree3Likes
  • 1 Post By Siassei
  • 1 Post By Cagatayemre
  • 1 Post By Cagatayemre

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 1, 2018, 18:49
Default Old and busted: snappyHexMesh and add layers with edges
  #1
Member
 
Join Date: Jun 2011
Location: Germany
Posts: 59
Rep Power: 15
Siassei is on a distinguished road
Hello,

for an old and busted problem with snappyHexMesh, I'm actually try to find an solution.
add layers + expand the layer count to the surface edge + merge the layer with the layers of the neugbour face.

Exampe by the tutorial
Code:
$ tutorials/mesh/snappyHexMesh/iglooWithFridges
I had added two images to figure out the problem I (we all) had. SnappyHexMesh reduce the layercount to all edges of an face without to consider the layers of an neighbour face. The added images shows an layer generation of an inner box. All faces had the same mesh size and layer attributes.

There are any possible tricks or hacks to expand the layers with constant count to the face edge (number 2 in plan.jgp) or connect the layers of an neigbour edge (number 1 in plan.jpg)?

Thank you very much for an information about the problem

Best regards,
Thomas

The added images are generated with the build number dev-c3fbcd739833.
Attached Images
File Type: jpg origin.jpg (108.6 KB, 195 views)
File Type: jpg plan.jpg (114.8 KB, 253 views)
allanZHONG likes this.
Siassei is offline   Reply With Quote

Old   August 2, 2018, 01:53
Default
  #2
Senior Member
 
Francesco Del Citto
Join Date: Mar 2009
Location: Zürich Area, Switzerland
Posts: 237
Rep Power: 18
fra76 is on a distinguished road
Hi Thomas,

Number 2 is defintevely not possible.
Number 1 should be achievable with some effort.

You need to play with the settings to smooth the volume mesh, the surface normals, the prisms height, with the quality criteria, etc...

Having a constant mesh size in the volume near the wall helps as well. You can try with some distance refinement.

In rough terms, snappy calculates the node normals on the surface, smooths them, calculate the displacement at each node according to the prisms settings, smooths them, moves the nodes off the surface, inserts prisms, then smooths everything in the volume to achieve the quality criteria.
If some cell does not respect one or more criteria, the extrusion from the corresponding surface nodes is disable and another layer addition iteration starts. At the end of each layer addition iteration, snappy reports the amount of cells that are not respecting the quality criteria.

You can activate some debug flag to dump the intermediate meshes during the layer addition (do not use -overwrite) and to print the coordinates of the points where extrusion is disabled (but it is quite obvious in your case).
If the quality in the intermediate steps is good enough for you, try to relax the criteria that are not met.

This is not one of snappy’s strong points however...

Hope this helps,
Francesco
fra76 is offline   Reply With Quote

Old   August 2, 2018, 09:17
Default
  #3
Senior Member
 
anonymous
Join Date: Jan 2016
Posts: 416
Rep Power: 14
simrego is on a distinguished road
Hi!


Or with OF from ESI group (v1712, or v1806, etc.) . In this fork you can use a displacementMotioNSolver for the mesh shrinking algorithm which can works much better for layering than The displacementMedialAxis.

On the right you can see the result of the displacementMotionSolver:
https://openfoam.com/documentation/c...reShrinker.png


Or try with relative sizes.
simrego is offline   Reply With Quote

Old   August 5, 2018, 15:12
Default
  #4
Member
 
Join Date: Jun 2011
Location: Germany
Posts: 59
Rep Power: 15
Siassei is on a distinguished road
Thanks for the answers.

As simrego tells me, I will checkout the openFoam+ code with the DisplacementMotionSolver. It seems to an good aproch for a "simple" step to get good layers. After a few tests / weeks I will report my results.
https://openfoam.com/documentation/c...ntmotionsolver
Siassei is offline   Reply With Quote

Old   August 6, 2018, 18:18
Default
  #5
Member
 
Join Date: Jun 2011
Location: Germany
Posts: 59
Rep Power: 15
Siassei is on a distinguished road
After a few tests back to the igloo example.

As I can see after a few, but not enough test, I can tell you

1. The usage of openFoam+ with the displacementMotionSolver creates layers of higher quality near an irregularity.
2. snappyHexMesh has problem to create layers, which I wish to have.

I had added to pictures of the igloo-tutorial with the openFoam+ displacementMotionSolver and the standard openFoam method.

So, question again It would be very nice that someone can tell me or add an snappyHexMeshDict that tell me, how I can create layers that I want.

@fra76 I understand your description. But I'm very new with openFOAM and not family with the possible parameters of the snappyHexMeshDict. Sorry
Attached Images
File Type: jpg openFoam-layers.jpg (203.9 KB, 174 views)
File Type: jpg openFoam-plus-layers.jpg (204.6 KB, 200 views)
Attached Files
File Type: h openFoam-plus_snappyHexMeshDict.h (10.2 KB, 16 views)
File Type: h openFoam_snappyHexMeshDict.h (10.3 KB, 12 views)
Siassei is offline   Reply With Quote

Old   August 14, 2018, 08:16
Default
  #6
Member
 
Çağatay Emre Ayhan
Join Date: Sep 2017
Location: Istanbul, Turkey
Posts: 31
Rep Power: 9
Cagatayemre is on a distinguished road
Sorry. Maybe you want to add layer to sharp edges but but my solution is to get smoother surface normals where you add layers. Using meshlab, selecting edge faces and apply taubin smooth (alpha, lambda) you can get curve-shape edges and generate layers easily.

Please look at this document, page 47, You will see a picture of a layer there. Change maxThicknessToMedialRatio and see the results.

https://openfoamwiki.net/images/f/f0...SlidesOFW7.pdf

Also try to change includedAngle in surfaceFeatureExtractDict. If your includedAngle is 150 degrees, resolveFeatureAngle in snappyHexMeshDict should be 30 degrees. Decreasing resolveFeatureAnge, you can resolve sharp edges. After resolving features, try to change feature angle under layer settings in snappyHexMeshDict.
Use a specific meshQualityDict for castellation and snap. Use another dict for layers.
Snapping quality should be better than layer quality. You should have well snapped mesh in order to generate good quality layers. You should try attached dictionaries and see the results. Maybe it can help. I didn't generate your case by the way. I generated layers of a cabin of a truck with attached meshQualityDicts
Attached Images
File Type: jpg FinalLayerThickness1cmAspectRatio1.05.jpg (90.1 KB, 170 views)
Attached Files
File Type: gz meshQualityDict.layer.tar.gz (1.3 KB, 52 views)
File Type: gz meshQualityDict.CastellationAndSnap.tar.gz (1.3 KB, 39 views)
kaanm likes this.

Last edited by Cagatayemre; August 15, 2018 at 10:22.
Cagatayemre is offline   Reply With Quote

Old   August 14, 2018, 19:33
Default
  #7
Member
 
Çağatay Emre Ayhan
Join Date: Sep 2017
Location: Istanbul, Turkey
Posts: 31
Rep Power: 9
Cagatayemre is on a distinguished road
And please look at this document, page 47, You will see a picture of a layer there. Changing maxThicknessToMedialRatio might be useful.
https://openfoamwiki.net/images/f/f0...SlidesOFW7.pdf
kaanm likes this.
Cagatayemre 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



All times are GMT -4. The time now is 14:39.