CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Meshing & Mesh Conversion (https://www.cfd-online.com/Forums/openfoam-meshing/)
-   -   [snappyHexMesh] Old and busted: snappyHexMesh and add layers with edges (https://www.cfd-online.com/Forums/openfoam-meshing/204825-old-busted-snappyhexmesh-add-layers-edges.html)

Siassei August 1, 2018 17:49

Old and busted: snappyHexMesh and add layers with edges
 
2 Attachment(s)
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.

fra76 August 2, 2018 00:53

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

simrego August 2, 2018 08:17

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.

Siassei August 5, 2018 14:12

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 August 6, 2018 17:18

4 Attachment(s)
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 :(

Cagatayemre August 14, 2018 07:16

3 Attachment(s)
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

Cagatayemre August 14, 2018 18:33

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


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