|View Issue Details|
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0002938||OpenFOAM||[All Projects] Bug||public||2018-05-16 07:45||2018-05-22 20:05|
|Target Version||Fixed in Version||dev|
|Summary||0002938: layerParameters.C: Number of iterations insufficient|
This is related to issue 0001918, where you increased the maximum number of iterations from 10 to 20. This seems sufficient for moderate number of layers, but I noticed that when inserting more layers (maybe unreasoably many...) this is still not sufficient.
For trying I have re-implemented in python, see attached notebook.
I would suggest to increase the maximum number of iterations to 200 or even more, as this costs hardly any CPU time and anyway it is just the maximum number of iterations.
Last edited: 2018-05-17 16:04
Why do you think that 200 is an appropriate maximum number of iterations? Under what conditions do you believe up to 200 is needed? In the example you provided 32 appears to be sufficient. Do you think the maximum number should depend on the number of layers?
Thanks for taking care of this!
I had suggested 200 as a large number which should never be reached. Furthermore, the iterations hardly cost anything. Even 1000 would not be a problem and put us on the safe side.
When I play around with the python code, the larger the ratio between the first and the last layer cell is (which equals the aspect ratio of the first layer cell, assuming a cubic final cell), the more iterations are required.
For an aspect ratio of about 200, which seems not unreasonable for layers on smooth geometries, I need about 40 iterations. With 100 iterations I can reach an aspect ratio of ~ 1200. Even this might be acceptable for LowRe meshes.
With 200 iterations I have an aspect ratio of 17000, which seems out of sensible range.
But I would suggest an unreasonable high maximum number of iterations to ensure that it is never reached. An alternative would be to throw an error if the maximum number is reached. Currently no warning is given but only a wrong (too large) expansion ratio is used. We noticed the problem because snappyHexMesh crashed on some meshes with face matching problems at processor boundaries. The reason was that it tried to make a mesh with a first layer thickness of 1e-8 meter instead of 3 mm.
But implementing an error message seems by far more effort than just increasing the maximum number of iterations.
|Resolved by commit 5caa5a3e9b8be651d34175d0923092f8aed55d05|
|2018-05-16 07:45||ole||New Issue|
|2018-05-16 07:45||ole||File Added: LayerCalc.html|
|2018-05-16 07:45||ole||Tag Attached: snappyHexMesh|
|2018-05-17 16:02||henry||Note Added: 0009591|
|2018-05-17 16:03||henry||Note Edited: 0009591||View Revisions|
|2018-05-17 16:04||henry||Note Edited: 0009591||View Revisions|
|2018-05-18 10:20||ole||Note Added: 0009604|
|2018-05-22 20:05||henry||Assigned To||=> henry|
|2018-05-22 20:05||henry||Status||new => resolved|
|2018-05-22 20:05||henry||Resolution||open => fixed|
|2018-05-22 20:05||henry||Fixed in Version||=> dev|
|2018-05-22 20:05||henry||Note Added: 0009624|