Any2HRTF / Mesh2HRTF

Open software for the numerical calculation of head-related transfer functions
European Union Public License 1.2
100 stars 11 forks source link

Non-converging simulations #135

Open langrenne opened 2 months ago

langrenne commented 2 months ago

Hello,

Thank you for your implementation of MLFMM. Unfortunately, for high frequencies, the simulations fail to converge. I try to modify the NC.inp as Brinkmann does, but it doesn't work for me.

I have 3 different person scan3D meshes, reduce with htrf_mesh_grading to have 50 000 elements (0.5 to 10mm). There is a problem with the three meshes for the right ear (may be a coincidence !?). The left ear are good.

What can I test ? Best, Christophe

sanketjain1101 commented 2 months ago

Hello Christophe,

I had a similar problem with non-convergence when i ran simulations and it also happened just for the right ear only. This was mainly because of overlapping faces in original high resolution mesh. You can also look at your elements and nodes file after simulation fails and try to locate the face which caused convergence issue.

To fix this issue: I remeshed the original high resolution mesh in meshlab , and also made sure that edge length < 1mm at least for the pinna region (which is important according to literature). Then you can continue with rest of the chain and perform hrtf-mesh-grading and start simulation. This should solve the problem. :)

PS: in my case it was all frequencies and not only high frequencies.

And most importantly, there is some documentation regarding this problem:

https://github.com/Any2HRTF/Mesh2HRTF/wiki/Basic_HRTF_NumCalc_Simulation

langrenne commented 2 months ago

Hello, Thank you for your answer. My problem happens only on the right ear (!?) and high frequencies. Normally, for a good mesh, the number of faces equals of the double minus 4 of the number of vertices : nE=2*V-4. My meshes are good, manifold before hrtf_mesh_grading. After hrtf_mesh, they are saved in ply files. I have sometime a problem to open them with Blender (to put skin, left and right ear materials). So i open/save them with meshlab which solve the problem. I try several parameters -g 0.15 to 0.20 in hrtf_mesh_grading, but without best result.

If you have an idea...

Best, Christophe

langrenne commented 2 months ago

I make some tries. Open/save with meshlab before Blender. Add, 0.05 in the NC.inp. Try other parameters -g 0.15 to 0.20 for the hrtf_mesh_grading. No convergence. I can pass my meshes for someone who wants testing them....

f-brinkmann commented 2 months ago

If you can send one of the meshes, I could have a quick look. In the meantime you could try if purley distance based mesh grading solves the issue. Out of coincidence I finished a re-implementation of the original Ziegelwanger method today. You could try to clone and compile this branch: https://github.com/cg-tub/pmp-library/tree/feature/distance_based_grading

In some cases the ML-FMM method can fail if a cluster contains large and small elements (https://www.sciencedirect.com/science/article/pii/S0955799724000171?via%3Dihub), which might happen due to the hybrid grading. We sometimes (but more rarely than you) experienced convergence issues that we could not narrow down. I wanted to test for a while if this might have been the cause.

langrenne commented 2 months ago

Thank you very much. I cannot test the distance_based_grading now. Perhaps in the end of the week. I send you 2 meshes, the original and a (de)grading.

I can't attache a stl or a ply file. How can I do to send them to you ? Best