|
[Sponsors] |
June 24, 2010, 10:35 |
|
#21 |
Senior Member
stephane sanchi
Join Date: Mar 2009
Posts: 314
Rep Power: 18 |
Niklas,
it works with tolerance 0.85 ! Now I will try it with layers around the cube. And with a more complex geometry. Great tool ! Stephane. |
|
June 30, 2010, 05:29 |
|
#22 |
Senior Member
stephane sanchi
Join Date: Mar 2009
Posts: 314
Rep Power: 18 |
Hi Niklas,
I am trying to use our tool for the ahmed body. Attached is a picture of the rear part of the body. Is it possible to improve the surface mesh ? Regards, Stephane. |
|
June 30, 2010, 05:51 |
|
#23 |
Super Moderator
Niklas Nordin
Join Date: Mar 2009
Location: Stockholm, Sweden
Posts: 693
Rep Power: 29 |
does this work better?
|
|
June 30, 2010, 06:49 |
|
#24 |
Senior Member
stephane sanchi
Join Date: Mar 2009
Posts: 314
Rep Power: 18 |
Hi Niklas,
I have done a smaller case with just the rear part. 2 kind of problems remain: 1. at the corners of the oblique edges 2. on the oblique edges Have a look at the attached picture. Regards, Stephane. |
|
June 30, 2010, 07:33 |
|
#25 |
Super Moderator
Niklas Nordin
Join Date: Mar 2009
Location: Stockholm, Sweden
Posts: 693
Rep Power: 29 |
To me it just looks like its a tolerance issue.
can you mail me the case so I can play with it. N |
|
June 30, 2010, 08:16 |
|
#26 |
Senior Member
stephane sanchi
Join Date: Mar 2009
Posts: 314
Rep Power: 18 |
what's your mail address ?
|
|
June 30, 2010, 08:32 |
|
#27 |
Super Moderator
Niklas Nordin
Join Date: Mar 2009
Location: Stockholm, Sweden
Posts: 693
Rep Power: 29 |
||
June 30, 2010, 10:48 |
|
#28 |
Senior Member
stephane sanchi
Join Date: Mar 2009
Posts: 314
Rep Power: 18 |
Niklas,
yes it works. No I will try it for the complete ahmed body. Thanks, Stephane. |
|
June 30, 2010, 11:27 |
|
#29 |
Senior Member
stephane sanchi
Join Date: Mar 2009
Posts: 314
Rep Power: 18 |
for the ahmed body some minor problems remain:
- the corner is not correct (first picture) - near the head of the ahmed body (second picture) there is one cell with 3 edges instead of 4 - the form of the cells at the oblique edge (first picture) could be improved to obtain cells like square stephane |
|
July 5, 2010, 15:03 |
|
#30 |
Member
Johannes Baumann
Join Date: Mar 2009
Location: Baden-Wuerttemberg, Germany
Posts: 43
Rep Power: 17 |
Hi Niklas,
from what I saw in this thread you did a nice job with your snapEdge tool! I would also like to give it a try but there's a small problem which has something to do with my stl creation workflow: Currently, the only way for me to create stls for snappy out of CAD geometry is to use multiple stl files so that every bc surface is represented by a seperate stl file. Unfortunately, snapEdge seems to be only working with one single stl which includes named sections. Would it be possible to extend snapEdge to be able to use multiple stl files? That would be really great! But if it's just too much work to do, I'll be satisfied with the current snapEdge features and will try to change my stl creation process. Many thanks in advance! Best regards, Johannes |
|
July 6, 2010, 03:19 |
|
#31 |
Super Moderator
Niklas Nordin
Join Date: Mar 2009
Location: Stockholm, Sweden
Posts: 693
Rep Power: 29 |
That should be pretty easy.
In the meantime, if you want to try it you can process 1 stl at a time. It writes the points to a new time directory, so if you have startFrom latestTime; It should be fine. N |
|
July 7, 2010, 03:42 |
|
#32 |
Super Moderator
Niklas Nordin
Join Date: Mar 2009
Location: Stockholm, Sweden
Posts: 693
Rep Power: 29 |
Can you try this. I dont have a case to try it on so if it doesnt work it would be great
if you could provide me with one. http://openfoam.nequam.se/cases/snapEdge.tgz |
|
July 7, 2010, 08:54 |
|
#33 |
Senior Member
stephane sanchi
Join Date: Mar 2009
Posts: 314
Rep Power: 18 |
Hi Niklas,
is this new version of snapEdge only for multiple stl files or also for single stl file ? Stephane. |
|
July 7, 2010, 08:58 |
|
#34 |
Super Moderator
Niklas Nordin
Join Date: Mar 2009
Location: Stockholm, Sweden
Posts: 693
Rep Power: 29 |
||
July 9, 2010, 08:10 |
|
#35 |
Member
Johannes Baumann
Join Date: Mar 2009
Location: Baden-Wuerttemberg, Germany
Posts: 43
Rep Power: 17 |
Hi Niklas,
thank you very much for the new snapEdge version. I haven't had time to test it yet, but I think I'll have within the next few days. Of course I can put together a small test case if it doesn't work out of the box. Best regards, Johannes |
|
July 11, 2010, 12:30 |
|
#36 |
Member
Juho Peltola
Join Date: Mar 2009
Location: Finland
Posts: 89
Rep Power: 17 |
Hi,
First I would like to thank Niklas for his work on snapEdge and sharing the tool! I've been testing snappyHexMesh on a geometry where I think it would be a good tool and it proved a very useful, except for the lack of feature edge snapping. Therefore I was delighted to find the snapEdge-tool here and I've been testing it on my case. The tool is easy to use and seem to mostly takes care of the feature edge preservation. However, a couple of notes: - My geometry consists of several stl-files. The snapping results seemed better if I only included the stl-file on one side of the edge to be snapped, instead of including them all. - A more troublesome note. after running snapEdge my mesh fails checkMesh on face orientation: Checking geometry... Overall domain bounding box (-0.0256 -0.009 -0.0256) (0.0256 0.035 0.0256) Mesh (non-empty, non-wedge) directions (1 1 1) Mesh (non-empty) directions (1 1 1) Boundary openness (-7.67448e-17 -1.92442e-17 -2.87288e-16) OK. Max cell openness = 3.26249e-16 OK. Max aspect ratio = 3.5401 OK. Minumum face area = 5.79544e-10. Maximum face area = 1.54916e-06. Face area magnitudes OK. Min volume = 2.88102e-12. Max volume = 1.38403e-09. Total volume = 8.936e-05. Cell volumes OK. Mesh non-orthogonality Max: 49.7654 average: 9.28351 Non-orthogonality check OK. ***Error in face pyramids: 68 faces are incorrectly oriented. <<Writing 68 faces with incorrect orientation to set wrongOrientedFaces Max skewness = 1.64219 OK. Failed 1 mesh checks. Is this a bug or am I doing something wrong? A picture of the geometry: Here's a picture of the snappyHexMesh result: http://tinypic.com/r/303l8xd/3 and the snapEdge result: http://tinypic.com/r/24xjl38/3 -Juho |
|
July 11, 2010, 18:41 |
|
#37 |
Member
Johannes Baumann
Join Date: Mar 2009
Location: Baden-Wuerttemberg, Germany
Posts: 43
Rep Power: 17 |
Hi Niklas,
I tried snapEdge with multiple stl files and it's working as expected! Now I just have to play around with the settings in the snapEdgeDict since most of the meshes I used for testing failed several checkMesh tests after edge-snapping. I like the 'includeInterior' feature of edge-snapping inside a patch (e.g. for a large wall patch) but noticed that it sometimes reduces mesh quality at fillets - although there should be no need for snapping at these locations. But this might be fixed with adjusting of some settings. One additional remark on the includeInterior switch: I had to use 'true' and 'false' instead of 'yes' and 'no' to make snapEdge work. No real problem, though. There might be an issue with relatively large patches and/or stl files. I tried a patch with about 80k cells and a corresponding stl file of 135 MB and got a floating point exception during the 'Smoothing patch faces...' phase. I'm currently testing different settings since it works once in while but creates a low quality mesh. I'll keep you updated on this. Thanks and best regards, Johannes |
|
July 12, 2010, 03:23 |
|
#38 |
Senior Member
stephane sanchi
Join Date: Mar 2009
Posts: 314
Rep Power: 18 |
Hi Johannes,
just set nSmootherIterations 0 and the 'Smoothing patch faces' will disappears. Stephane. |
|
July 12, 2010, 03:45 |
|
#39 |
Super Moderator
Niklas Nordin
Join Date: Mar 2009
Location: Stockholm, Sweden
Posts: 693
Rep Power: 29 |
Juho:
Sometimes I get those bad faces as well. Snapping the edges all the way to feature-lines sometimes cause this and what I do then is to set the relaxation to something lower than 1. This will not yield an exact feature representation, but visibly you can hardly see any difference and thats 'good enough' for me. It all depends on how the mesh produced by snappyHexMesh looks. Sometimes an inlet patch can be more or less on the adjacent wall and the neighbouring face can be more or less on the inlet and that creates some problem. Ideally I'd like to have the program move the faces to/from patches if the are too far outside, but that's something for the future Johannes: If you are using includeInterior its important that you dont set tolerance to something larger than 1 as this will 'attract' edges that are really too far away. I've tried to improve this by checking the angle between the face-edge and feature line so that it doesnt snap edges that are perpendicular to the feature-line, but its more or less a question of tolerance. I recommend you dont do any smoothing, its something I'm working on and its not very good atm. Just set the smoother iterations to 0. I should have commented out that section. Finally...As I say on the wiki, sometimes it works and sometimes not, but I've always been able to improve the feature representation and its just a little tool I wrote for me without the intention of releasing it, but as I discovered that I wasnt alone with this problem I thought I'd share it with the rest of you hoping that you'd find some use for it. So bare that in mind that its very much a work-in-progress. N Edit: Oh and if you have any problems with a case I'd really like to have it so I can improve snapEdge, as almost all of my stl's are quite simple pipes. |
|
July 13, 2010, 09:58 |
|
#40 |
Senior Member
stephane sanchi
Join Date: Mar 2009
Posts: 314
Rep Power: 18 |
Hi Niklas,
it would be nice to have the -overwrite option as for snappyHexMesh. After having used your snapEdge tool I have the following files: /3/meshPhi.gz /3/polyMesh/points.gz Do I have to put both file into the directory : /constant/polyMesh/ Regards, Stephane. |
|
Tags |
edges, jagged edges, snappyhexmesh |
|
|
Similar Threads | ||||
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 |