|
[Sponsors] |
[snappyHexMesh] Howto set mesh size tolerance |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
July 19, 2012, 13:39 |
Howto set mesh size tolerance
|
#1 |
Member
ms
Join Date: Mar 2009
Location: West London
Posts: 47
Rep Power: 17 |
Hi everyone,
I'm using the snappyHexMesh castellatedMesh step on its own, to refine up to 7 or 8 levels from an original blockMesh with nCellsBetweenLevels 3. I have a surface defined in an STL file. The surface is being picked up ok but as I increase my refinement level beyond 6 I start getting 0 determinant cells and checkMesh tells me I have nearPoints (closer than 1.5e-06 apart). Yet, inspection of the problem cells in paraFoam shows good looking cubes that are in reasonable places. It is possible that snappy is stopping before full refinement has occurred but I wonder: How can I tighten the spatial tolerances in snappy? I have adjusted my controlDict writePrecision to 8 and my mergeTolerance in snappyHexMeshDict to 1E-8 but this seems not to help. Any pointers would be welcome! Best regards, Mark. |
|
July 20, 2012, 12:05 |
|
#2 |
Member
ms
Join Date: Mar 2009
Location: West London
Posts: 47
Rep Power: 17 |
I also set minVol to -1E30 to turn off the minimum volume checker: still the same effect.
Please, if anyone has any comment, I'd like to hear it! Snapping to the .stl is working wonderfully, the mesh looks good and I've almost got layer addition working but if I can't beat this single, zero determinant cell this is a no-go! Cheers, Mark. |
|
July 20, 2012, 15:23 |
|
#3 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128 |
Greetings Mark,
Did you see this at the bottom of "snappyHexMeshDict"? Code:
// Merge tolerance. Is fraction of overall bounding box of initial mesh. // Note: the write tolerance needs to be higher than this. mergeTolerance 1E-6; edit: I advise you to use "binary" mode in "controlDict", instead of "ascii". Best regards, Bruno
__________________
Last edited by wyldckat; July 20, 2012 at 15:37. Reason: see "edit:" |
|
July 23, 2012, 02:55 |
|
#4 |
Member
Join Date: Apr 2012
Location: France
Posts: 72
Rep Power: 14 |
||
July 23, 2012, 05:23 |
|
#5 | |
Member
ms
Join Date: Mar 2009
Location: West London
Posts: 47
Rep Power: 17 |
Quote:
I did spot that parameter and experimented with it. I'd convinced myself it wasn't helping. I'll try again. Regarding binary mode, I hadn't considered it. Great idea! Thanks again, Mark. |
||
July 23, 2012, 10:19 |
|
#6 |
Member
ms
Join Date: Mar 2009
Location: West London
Posts: 47
Rep Power: 17 |
My single zero determinant is now a tiny determinant: 7E-46. Thanks for the tip.
As for the difference between ascii and binary mode: ascii: 164 Mb per time-step. binary: 79Mb per time-step. Lovely. |
|
July 23, 2012, 17:19 |
|
#7 | |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128 |
Greetings to all!
Quote:
ASCII is a nice format for:
And as confirmed by Mark, the more precision you have for the mesh, the merrier the user Best regards, Bruno
__________________
Last edited by wyldckat; July 23, 2012 at 17:22. Reason: typo |
||
July 24, 2012, 10:32 |
|
#8 |
Member
Join Date: Apr 2012
Location: France
Posts: 72
Rep Power: 14 |
Thank you both for your clarification
|
|
July 25, 2012, 04:51 |
Update
|
#9 |
Member
ms
Join Date: Mar 2009
Location: West London
Posts: 47
Rep Power: 17 |
I've now changed to binary format in all my simulations. Great tip, Bruno. I've also adjusted my tolerances. However, the zero determinant that turned into a tiny determinant with a change of tolerances, vanished when I changed my snappyHexMeshDict:castellatedMeshControls parameter,
Code:
refinementSurface { anemometer { level (7 7); } } Code:
refinementSurface { anemometer { level (8 8); } } In fact, I get something like the following: Code:
level minimum determinant (2 2) 1 (3 3) 1 (4 4) 1 (5 5) 1 (6 6) 1 (7 7) 0 (or very small with tight spatial tolerances (8 8) 1 Best regards, Mark. |
|
July 25, 2012, 13:46 |
|
#10 | |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128 |
Hi Mark,
I've picked up on this post which should help you a lot: Quote:
Best regards, Bruno
__________________
|
||
July 28, 2012, 13:17 |
|
#11 |
Member
ms
Join Date: Mar 2009
Location: West London
Posts: 47
Rep Power: 17 |
Read it and digested. Cheers Bruno.
|
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
decomposePar problem: Cell 0contains face labels out of range | vaina74 | OpenFOAM Pre-Processing | 37 | July 20, 2020 05:38 |
[snappyHexMesh] Number of cells in mesh don't match with size of cellLevel | colinB | OpenFOAM Meshing & Mesh Conversion | 14 | December 12, 2018 08:07 |
Moving mesh | Niklas Wikstrom (Wikstrom) | OpenFOAM Running, Solving & CFD | 122 | June 15, 2014 06:20 |
[Gmsh] 2D Mesh Generation Tutorial for GMSH | aeroslacker | OpenFOAM Meshing & Mesh Conversion | 12 | January 19, 2012 03:52 |
Problems in compiling paraview in Suse 10.3 platform | chiven | OpenFOAM Installation | 3 | December 1, 2009 07:21 |