|
[Sponsors] |
![]() |
![]() |
#101 | |
Senior Member
|
Quote:
I was using an old controlDict with some average functionObjects activated... Now it works, I just need to play around with the tolerance! |
||
![]() |
![]() |
![]() |
![]() |
#102 |
Member
P.A.
Join Date: Mar 2009
Location: Germany
Posts: 83
Rep Power: 17 ![]() |
Hi Niklas and Foamers,
I have a problem with the results of your snapEdge tool, which is really a great improvement. The problem is depicted in the attached image. It is a simple cuboid with only straight angles at each corner, all packed in a cylindrical domain. The picture shows a detail of the layer mesh at a corner of the cuboid. I generate a grid using blockMesh, then sHM (with a stl file describing the cuboid). With sHM, I do the castellation, snapping and layer adding steps. Then I use snapEdge. This produces a new timestep (4 in this case) directory which contains a polymesh/points file which I copy to the last sHM generated timestep directory (which is 3 in this case). Now I would expect to see correctly snapped edges AND faces, but as can be seen in the attached picture, the faces are not generated according to the new points file. This actually confuses me, as I thought until now that the faces are described by the points in the points file. But then, why don't the faces follow the new points description? What am I doing wrong? I suspect that I miss some essential step, or I do things in a wrong order, but I am stuck here and need some help! Thank you very much in advance! Cheers, Pascal. Last edited by blaise; November 10, 2010 at 08:21. Reason: picture attached |
|
![]() |
![]() |
![]() |
![]() |
#103 |
Super Moderator
Niklas Nordin
Join Date: Mar 2009
Location: Stockholm, Sweden
Posts: 693
Rep Power: 29 ![]() ![]() |
...awaiting pictures.
|
|
![]() |
![]() |
![]() |
![]() |
#104 |
Member
P.A.
Join Date: Mar 2009
Location: Germany
Posts: 83
Rep Power: 17 ![]() |
... don't understand why it is gone... it was there in the preview...
is it there now? Cheers, Pascal. |
|
![]() |
![]() |
![]() |
![]() |
#105 |
Super Moderator
Niklas Nordin
Join Date: Mar 2009
Location: Stockholm, Sweden
Posts: 693
Rep Power: 29 ![]() ![]() |
yes, it is there now.
This will never work. You have several lines crossing the edge, but snapEdge only works on the boundaries, so this will produce negative volumes. This is why you should use snapEdge before adding the boundary refinement. |
|
![]() |
![]() |
![]() |
![]() |
#106 |
Member
P.A.
Join Date: Mar 2009
Location: Germany
Posts: 83
Rep Power: 17 ![]() |
Hi Niklas,
if I use snapEdge before the creation of layers, the layers don't get created, because there is no longer any intersection of the stl geometry and the existing grid. So if I run sHM _after_ snapEdge, with only the layer step activated, it simply doesn't create layers. So, what am I supposed to do to create the layers after the snapEdge step? Cheers, Pascal. |
|
![]() |
![]() |
![]() |
![]() |
#107 |
Super Moderator
Niklas Nordin
Join Date: Mar 2009
Location: Stockholm, Sweden
Posts: 693
Rep Power: 29 ![]() ![]() |
i have no idea. it sound like something fundamentally wrong in your setup, but I need the case to solve it.
|
|
![]() |
![]() |
![]() |
![]() |
#108 | |
Member
P.A.
Join Date: Mar 2009
Location: Germany
Posts: 83
Rep Power: 17 ![]() |
Quote:
Cheers, Pascal. |
||
![]() |
![]() |
![]() |
![]() |
#109 |
Senior Member
Join Date: Mar 2009
Location: My oyster
Posts: 124
Rep Power: 17 ![]() |
Setting maxConcave to 1 fixed such a problem for me on a rectangular shape. Maybe it works on your geometry.
|
|
![]() |
![]() |
![]() |
![]() |
#110 |
Super Moderator
Niklas Nordin
Join Date: Mar 2009
Location: Stockholm, Sweden
Posts: 693
Rep Power: 29 ![]() ![]() |
i had no problems at all running the setup
1. blockMesh 2. snappyHexMesh layers false 3. snapEdge 4. snappyHexMesh only layers true are you sure you are looking at the last timestep when you look at the mesh? |
|
![]() |
![]() |
![]() |
![]() |
#111 | |
Member
P.A.
Join Date: Mar 2009
Location: Germany
Posts: 83
Rep Power: 17 ![]() |
Quote:
I don't get it! I just tried the setup I sent to you myself and it does NOT work! What do you do different than me? :-/// I tried it with OF 1.6.x and 1.7.x. Which version do you use? Is snapEdge supposed to produce a full timestep directory, i. e. with all the boundary and faces and whatever files in it? What is meshPhi used for? Does this file have to go somewhere? Ok, I did not mention one strange thing that happens inbetween (step 3 in the following description of my work flow): 1) blockMesh ==> ok 2) sHM without layers ==> ok 3) snapEdge ==> not ok reason (output from snapEdge) ============================== Create time Create mesh for time = 2 Finding features for stl : stl_quader_only_scaled.stl Done! Could not find patch: Q_LID Available patches are: ZYL_AUSSEN ZYL_TOP ZYL_BASE quader_Q_LID quader_Q_TOP quader_Q_FRONT quader_Q_BOTTOM quader_Q_BACK ============================= Solution: Remove the "quader_" prefix from the patch names in the 2/polymesh/boundary file. 4) snapEdge ==> ok This produces the correctly snapped mesh 5) sHM, only layers ==> not ok reason (end of output from sHM): ============================= Merging all faces of a cell --------------------------- - which are on the same patch - which make an angle < 90 degrees (cos:6.12323399574e-17) - as long as the resulting face doesn't become concave by more than 90 degrees (0=straight, 180=fully concave) Merging 0 sets of faces. No faces merged ... Merging all points on surface that - are used by only two boundary faces and - make an angle with a cosine of more than 6.12323399574e-17. No straight edges simplified and no points removed ... No layers to generate ... Layer mesh : cells:248295 faces:782175 points:285748 Cells per refinement level: 0 174915 1 8580 2 64800 Writing mesh to time 4 Written mesh in = 0.8 s. Layers added in = 0.8 s. Finished meshing in = 4.79 s. End ================================= 6) cp 3/polymesh/points 2/polymesh/ rm -rf 3/ 4/ 7) sHM ==> Same result as in 5) What really puzzles me is the problem in step 3. Do you experience this too? I really appreciate your help and I hope it doesn't take too much off your time budget, but I am lost here... Thanks a lot! Cheers, Pascal. P.S.: I attach the full output files from each of the 7 steps (but 6) described above, just in case you need to look at some details. |
||
![]() |
![]() |
![]() |
![]() |
#112 | |
Super Moderator
Niklas Nordin
Join Date: Mar 2009
Location: Stockholm, Sweden
Posts: 693
Rep Power: 29 ![]() ![]() |
Quote:
Try changing the names in snapEdgeDict instead. This is what mine says snapPatches ( quader_Q_LID //quader_Q_TOP quader_Q_FRONT quader_Q_BOTTOM quader_Q_BACK ); |
||
![]() |
![]() |
![]() |
![]() |
#113 |
Member
P.A.
Join Date: Mar 2009
Location: Germany
Posts: 83
Rep Power: 17 ![]() |
Hi Ziad,
I tried this before and it solved most of the critical points, but not all. Moreover I want toi be able to use Niklas snapEdge tool for more complex geometries where I might need to have the maxConcave setting available for more fine grained control. Cheers, Pascal. |
|
![]() |
![]() |
![]() |
![]() |
#114 |
Member
P.A.
Join Date: Mar 2009
Location: Germany
Posts: 83
Rep Power: 17 ![]() |
Yeaaaaaah!
That's it!!! You made my day! Thank you so much for your help and your great tool!!! Best regards! Pascal. |
|
![]() |
![]() |
![]() |
![]() |
#115 |
Senior Member
stephane sanchi
Join Date: Mar 2009
Posts: 314
Rep Power: 18 ![]() |
Hi Pascal,
hereafter is the answer to the private mail you sent me some days ago: the layers are degrading towards the edges, rather than being continued around the edges. For my case (cube) the problem has been solved changing the featureAngle value in the "addLayerControls" subdictionary: Default value was 30 New value is 5 Have a look at the following thread: http://www.cfd-online.com/Forums/ope...pyhexmesh.html Best regards, Stephane. |
|
![]() |
![]() |
![]() |
![]() |
#116 |
New Member
Join Date: Mar 2010
Posts: 7
Rep Power: 16 ![]() |
Hi,
first of all I'd like to thank you for providing such a great tool! But of course every new tool brings new questions... here's mine: can snapEdge detect the end of a surface as an edge? For example if my STL-file fust defines a free surface, will the end of the surface be detected as edge? In my case I have a piece of fabric that is modelled as surface (not as volume). I can make a mesh around that with snappyHexMesh. But I could not get snapEdge to work with it. Here's a picture... Do you think you can teach your "findEdges"-function to recognize surface ends? |
|
![]() |
![]() |
![]() |
![]() |
#117 |
Senior Member
|
Hi Foamers,
still experiencing some issues with SHM+snapEdge. I've meshed my serrated-tail airfoil, doing SHM, and to preserve the edges in the tail region I used snapEdge. Everything seems ok, the edges are correctly preserved, but when I do a checkMesh on the snapEdge-ed mesh, i find: Checking geometry... Overall domain bounding box (-7.5 -7.5 -4.681865e-17) (11 7.5 0.050000001) Mesh (non-empty, non-wedge) directions (1 1 1) Mesh (non-empty) directions (1 1 1) Boundary openness (1.394724e-17 -1.332086e-17 2.157553e-12) OK. Max cell openness = 3.6734125e-16 OK. Max aspect ratio = 87.78811 OK. Minumum face area = 2.4743271e-08. Maximum face area = 0.72347347. Face area magnitudes OK. Min volume = 1.3582091e-11. Max volume = 0.0090434184. Total volume = 13.870883. Cell volumes OK. Mesh non-orthogonality Max: 55.729817 average: 6.8807493 Non-orthogonality check OK. ***Error in face pyramids: 4 faces are incorrectly oriented. <<Writing 4 faces with incorrect orientation to set wrongOrientedFaces Max skewness = 3.0275911 OK. Failed 1 mesh checks. End I can't find anything apparently wrong by an inspection of the mesh. Some picture of the mesh: ![]() A zoom in the tail region: ![]() More zoom: ![]() What does this error in face orientation is? I don't have it after SHM, it seems that it's introduced by snapEdge. What can I do to overcome this problem? I attached the SHM and snapEdge dictionaries... Thanks, Ivan |
|
![]() |
![]() |
![]() |
![]() |
#118 |
Super Moderator
Niklas Nordin
Join Date: Mar 2009
Location: Stockholm, Sweden
Posts: 693
Rep Power: 29 ![]() ![]() |
Yes. All ends of the surface are automatically detected as edges.
By setting 'includeInterior yes' you will also add more lines to the list of features. ivan_cozza: I get that error also sometimes. What I do then is to use foamToVTK -faceSet wrongOrientedFaces and look at the faces in paraview. Sometimes I dont see anything wrong with them and the simulation runs fine anyway. But if you want to get rid of the error you can reduce the amount of snapping. Instead of moving the points 100% to the edge, you can move it lets say 95%. You will not see the difference, but checkMesh will be happy. |
|
![]() |
![]() |
![]() |
![]() |
#119 | |
Senior Member
|
Quote:
How can I reduce the amount of snapping? This afternoon I will have a test on this modifications, then I will move to the boundary layer problem (snappy went quite crazy in extruding the boundary layers on this geo...)!!! Ivan |
||
![]() |
![]() |
![]() |
![]() |
#120 |
Super Moderator
Niklas Nordin
Join Date: Mar 2009
Location: Stockholm, Sweden
Posts: 693
Rep Power: 29 ![]() ![]() |
||
![]() |
![]() |
![]() |
Tags |
edges, jagged edges, snappyhexmesh |
|
|
![]() |
||||
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 does not create any mesh except one for the reference cell | Arman_N | OpenFOAM Meshing & Mesh Conversion | 1 | May 20, 2019 18:16 |
[snappyHexMesh] sHM layer process keeps getting killed | MBttR | OpenFOAM Meshing & Mesh Conversion | 4 | August 15, 2016 04:21 |
[snappyHexMesh] No layers in a small gap | bobburnquist | OpenFOAM Meshing & Mesh Conversion | 6 | August 26, 2015 10:38 |
[snappyHexMesh] snappyHexMesh won't work - zeros everywhere! | sc298 | OpenFOAM Meshing & Mesh Conversion | 2 | March 27, 2011 22:11 |