|
[Sponsors] |
[snappyHexMesh] problems with sHM: it doesn't snap! |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
August 13, 2013, 08:26 |
problems with sHM: it doesn't snap!
|
#1 |
Member
Claudio
Join Date: Mar 2012
Location: Milano, Italy
Posts: 49
Rep Power: 14 |
Dear Foamers,
I'm writing because I'm having many troubles with snappyHexMesh: it doesn't snap! I know this is "common": looking around in the forum, I found many others who have had similar problems, but none of the suggested solutions seems working in my case! My best results are: - one in which, starting from a very coarse background mesh, it does the snap stage, but the final mesh is useless for the simulation; - another that would be good for the simulation (I think) but it doesn't snap, so all the surface is done by steps! The strange thing in the second case is that in the log file of sHM I don't find the typical sentence "did not succesfully snap mesh. Giving up", and in the checkMesh I have no errors! I tried many different combinations with the Dicts (blockMeshDict and snappyHexMeshDict): - increasing or decreasing the intial number, - increasing or decreasing the number of levels in sHMDict, directly for the refinementSurface or in the feature obteined with the command surfaceFeatureExtract, - increasing the parameters in the subDict "snapControls". Often it doesn't snap, saying "did not succesfully snap mesh. Giving up"; sometimes it doesn't say anithing, but it similarly doesn't snap! I have no ideas now about what I can do, and about what is wrong! I attach these two cases I obtained, with some images. I hope someone could help me! Best regards, Claudio |
|
August 13, 2013, 10:27 |
|
#2 |
Senior Member
Artur
Join Date: May 2013
Location: Southampton, UK
Posts: 372
Rep Power: 20 |
While this doesn't answer all your problems it may help: in the "partially snapped case" I would try reducing the tolerance in snap control to an even lower number (your uploaded case has it at 1.0). I have had similar problems with a fine mesh resolution in the past and it seemed to have helped. I think the problem here might be that the mesh does snap but too many or too few points are attracted to the surface.
|
|
August 13, 2013, 11:12 |
|
#3 |
Member
Claudio
Join Date: Mar 2012
Location: Milano, Italy
Posts: 49
Rep Power: 14 |
Dear Artur,
thank you for your quick answer! Effectively, I didn't try to reduce tolerance less than 1: I will! Do you say to try changing just that value, or maybe some other snap parameter? (I tried yet increasing the different numbers of iterations, but nothing seems to change!) Thank you, Claudio |
|
August 13, 2013, 11:15 |
|
#4 |
Senior Member
Artur
Join Date: May 2013
Location: Southampton, UK
Posts: 372
Rep Power: 20 |
Personally I try to change them one by one because that makes it easier to figure out what the effect of each of them is on your mesh. I would try keeping them as they are at the moment and see where it gets you.
|
|
August 14, 2013, 12:18 |
|
#5 |
Member
Claudio
Join Date: Mar 2012
Location: Milano, Italy
Posts: 49
Rep Power: 14 |
Dear Artur,
I tried to reduce the tolerance in snap control, as you suggested, but nothing seems changed . In the log of sHM I find a very very long list of warnings like this: --> FOAM Warning : From function autoSnapDriver::calcNearestSurface(..) in file autoHexMesh/autoHexMeshDriver/autoSnapDriver.C at line 914 For point:16 coordinate0.0464325 0.0225236 -0.00174957) did not find any surface within:8.66976e-07 meter. I tried this with both the cases, partially snapped and without snap stage done. So, I didn't any new step, as you can see from the pictures attached. I accept any other suggestion! |
|
August 14, 2013, 12:33 |
|
#6 |
Senior Member
Artur
Join Date: May 2013
Location: Southampton, UK
Posts: 372
Rep Power: 20 |
This warning indicates that the tolerance is reduced too much and so the algorithm can't find a point which is close to the surface and hence it doesn't snap. In which case I'm not sure what's wrong, I'm afraid. If you want you can send me your case by email or upload here and I can have a quick look at it tomorrow.
|
|
August 14, 2013, 12:45 |
|
#7 |
Member
Claudio
Join Date: Mar 2012
Location: Milano, Italy
Posts: 49
Rep Power: 14 |
I think I could send you my case by email, because the stl is too big to be uploaded here.
If you could have a look I'd be really grateful, because are about 3 weeks I'm fighting with this mesh! |
|
August 15, 2013, 08:57 |
|
#8 |
Senior Member
Artur
Join Date: May 2013
Location: Southampton, UK
Posts: 372
Rep Power: 20 |
Try this.
It seems it was one of the mesh quality parameters. Didn't have time to verify which one exactly but I've indicated which ones I changed so you can work it out yourself if you so wish. Last edited by Artur; August 15, 2013 at 12:33. Reason: Spelling |
|
August 15, 2013, 12:31 |
|
#9 |
Member
Claudio
Join Date: Mar 2012
Location: Milano, Italy
Posts: 49
Rep Power: 14 |
Thank you very much Artur. I'll try this tonight, then I'll give you a feedback.
|
|
August 16, 2013, 08:53 |
|
#10 |
Member
Claudio
Join Date: Mar 2012
Location: Milano, Italy
Posts: 49
Rep Power: 14 |
Dear Artur,
I tried using your suggestions, unfortunely without good results. I have run it not in parallel, but I don't think this can be the problem. Did you try it and it worked correctly?! As you can see opening the sHM log files attached, it doesn't snap (the typical sentence "Did not succesfully snap mesh. Giving up." appears!), and I don't understand why: apparently, there are no errors. The unique warnig gived is like this: --> FOAM Warning : Displacement (-5.47403e-07 9.12509e-07 3.62186e-06) at mesh point 551088 coord (0.0485061 0.0227736 -0.00144371) points through the surrounding patch faces after Morph iteration 0. Moreover, another "error" appear: some closed regions are now meshed, thing doesn't desired! (you can see the difference comparing the images). Now I'm tring replacing the old control parameters, once per time, to understand which one is the "guilty"! However, remain my problem: it doesn't snap! Thank you for your patience! Claudio |
|
August 16, 2013, 09:13 |
|
#11 |
Senior Member
Niels Nielsen
Join Date: Mar 2009
Location: NJ - Denmark
Posts: 556
Rep Power: 27 |
Hi
Is it possible for you to share the full case with the geometry file etc? Otherwise the help can get very lengthy if we can play around with all possible options.
__________________
Linnemann PS. I do not do personal support, so please post in the forums. |
|
August 16, 2013, 09:29 |
|
#12 |
Senior Member
Artur
Join Date: May 2013
Location: Southampton, UK
Posts: 372
Rep Power: 20 |
Just to make sure, I re-ran your case on a single core with the exact same settings as the ones I posted and here's the result. No error messages, checkMesh ok. sHM log says it didn't snap successfully for some reason but by inspecting it I'd say it's snapped. I am running 2.2.0. Perhaps you are using a different version and that's where the problems are coming from?
Last edited by Artur; August 16, 2013 at 09:29. Reason: spelling |
|
August 16, 2013, 10:22 |
|
#13 |
Member
Claudio
Join Date: Mar 2012
Location: Milano, Italy
Posts: 49
Rep Power: 14 |
@Artur:
I'm running OF 2.1.0, but looking the images you posted, the result seems the same. I'm just worried about sHM log says it didn't snap successfully. With the snap stage completed I'd expected a smooth surface, instead of that kind of waves on it; but I can't be sure, because my experience is still limited! If you think this is good enough to try a simulation, I'll start with the next step. What about the unwanted mesh in the closed zones? Do they appear also to you? @Niels: Hi. Thank you for your answer. Unfortunately, the geometry file (STL) is too big to post the full case on the forum. But if you want, I can send you it by email (if you give me your address), as I did with Artur. |
|
August 16, 2013, 10:57 |
|
#14 |
Senior Member
Artur
Join Date: May 2013
Location: Southampton, UK
Posts: 372
Rep Power: 20 |
This setup gives you better snapping and no warnings but for me it produced a few highly skewed faces (although tolerable I think with max skewness 4.5).
|
|
August 16, 2013, 11:04 |
|
#15 |
Member
Claudio
Join Date: Mar 2012
Location: Milano, Italy
Posts: 49
Rep Power: 14 |
I'll try also this one; it seems better !
|
|
August 17, 2013, 07:19 |
|
#16 |
Senior Member
Niels Nielsen
Join Date: Mar 2009
Location: NJ - Denmark
Posts: 556
Rep Power: 27 |
Could you not just use one of the file sharing options we have nowadays like dropbox, box, google drive, skydrive, etc.
They all make it possible to share a public link to a file.
__________________
Linnemann PS. I do not do personal support, so please post in the forums. |
|
August 19, 2013, 13:29 |
|
#17 |
Member
Miro
Join Date: Jan 2013
Location: Europe
Posts: 51
Rep Power: 13 |
Hello,
has anyone tried to refine .stl? Your stl should be as fine as possible. Also, you can check if your stl is OK; I use Netgen for that. If your stl passes check in netgen, you can be sure that it is not the problem sudo apt-get install Netgen - miro |
|
August 19, 2013, 20:27 |
|
#18 |
Member
Claudio
Join Date: Mar 2012
Location: Milano, Italy
Posts: 49
Rep Power: 14 |
Dear Niels,
here https://www.dropbox.com/sh/4883og40gjjih86/il5SL7uc0F there is the link you asked for, with my case (the same I sent to Artur, the one that doesn't snap). I'm still looking for a better solution, because I did some steps with the help of Artur's suggestions, but it isn't how I would like it! Dear Miro, I checked the .stl just using Catia: effectively, there were many "holes" and I had to connect some surfaces. But now it seems to be good; only that, changing some parameters I have the problem I exposed in post #10. I'll check also with Netgen (or gmsh), even if I don't know how to use them...I'll try to learn fast! Best regards, Claudio |
|
August 20, 2013, 02:55 |
|
#19 |
Member
Miro
Join Date: Jan 2013
Location: Europe
Posts: 51
Rep Power: 13 |
I'm glad it worked. Note that you should make your .stl as fine as possible.
It's really simple to check stl in netgen. It's something like edit -> checkMesh or something like that. After you import it of-course. - miro |
|
August 22, 2013, 11:14 |
|
#20 |
Senior Member
|
Dear All,
I have some problem with edge snapping. the steps I followed is: 1) I executed blockMesh after setting up the case ( 0 cons-> ( poly, trisurf) sys), see fig 1. 2) Secondly, as Bruno's post, the surfaceFeatureExtract command has been executed.
castellatedMesh true; snap true; addLayers false; geometry { fanGeo.stl { type triSurfaceMesh; name fanGeo; } refinementBox { type searchableBox; min (-0.4 0.2 -0.1); max (0.4 0.8 0.1); } }; // Settings for the castellatedMesh generation. castellatedMeshControls { maxLocalCells 2000000; maxGlobalCells 20000000; minRefinementCells 3; maxLoadUnbalance 0.10; nCellsBetweenLevels 5; features ( { file "fanGeo.eMesh"; level 4; } ); refinementSurfaces { fanGeo { level (4 4); } } // Resolve sharp angles resolveFeatureAngle 30; refinementRegions { } locationInMesh (0.15 0.46 1); allowFreeStandingZoneFaces true; } // Settings for the snapping. snapControls { nSmoothPatch 5; tolerance 1; nSolveIter 300; nRelaxIter 5; nFeatureSnapIter 20; } // Generic mesh quality settings. At any undoable phase these determine // where to undo. meshQualityControls { maxNonOrtho 65; maxBoundarySkewness 20; maxInternalSkewness 4; maxConcave 80; minVol 1e-13; minTetQuality 1e-30; minArea -1; minTwist 0.02; minDeterminant 0.001; minFaceWeight 0.02; minVolRatio 0.01; minTriangleTwist -1; nSmoothScale 4; errorReduction 0.75; } I tried many cases, but still the edge of the fan is not on the line. see fig.2 (bladeEdge) please help me to get the good edge snapping. Thanks, Sivakumar |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Benchmark Problems to test a new scheme for Convection-diffusion equation | alibaig1991 | Main CFD Forum | 1 | June 16, 2018 05:30 |
Patankar 1980 (Diffusion Convection Problems) | hhandoko | System Analysis | 1 | January 25, 2018 08:56 |
[snappyHexMesh] gaps for close surfaces- meshing with sHM | jango | OpenFOAM Meshing & Mesh Conversion | 0 | November 28, 2016 03:10 |
[snappyHexMesh] Boundary layer generation problems | ivan_cozza | OpenFOAM Meshing & Mesh Conversion | 0 | October 6, 2010 14:47 |
[snappyHexMesh] problems with snappyHexMesh | StSchiff | OpenFOAM Meshing & Mesh Conversion | 7 | August 9, 2010 12:11 |