Any2HRTF / Mesh2HRTF

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

Error in exporting projects with a Plane wave source #109

Closed f-brinkmann closed 3 months ago

f-brinkmann commented 1 year ago

Plane wave sources are currently not correctly written to the NC.inp file (NumCalc/source_1 in the Mesh2HRTF project folder). This will be fixed with #108. In the meantime, use this work-around

Kaves-Engineering commented 9 months ago

Having noticed this problem, I looked for the bug in the code found what I think is another bug: Line 296 in NCIinput.cpp. Perhaps the variable numIncidentPlaneWaves should be numPointSources_.

f-brinkmann commented 9 months ago

@Kaves-Engineering, thanks for reporting. We are testing plane waves scattered by a sphere against analytical soloutions, so I hope everything is fine. If you need plane wave export from Blender, I could already make a patch release of #108. I was holding it back to improve related tests, but I don't see that I find time for that in the next weeks.

@schaastrommla, could you have a look?

Kaves-Engineering commented 9 months ago

If the work-around is viable, I have no rush. My purpose of using plane waves is to compare plane waves scattered by a sphere using mesh2hrtf with the same analysis perfomed in COMSOL multiphysics as a reference test.

f-brinkmann commented 9 months ago

Yes that should work. We have tests that are running correctly for a plane wave scattered by a rigid and sound soft sphere:

https://github.com/Any2HRTF/Mesh2HRTF/blob/master/tests/resources/test_numcalc/analytical_references/comparisonplot_rigid_plane_ml-fmm-bem.jpg

https://github.com/Any2HRTF/Mesh2HRTF/blob/master/tests/resources/test_numcalc/analytical_references/comparisonplot_soft_plane_ml-fmm-bem.jpg

f-brinkmann commented 3 months ago

This is fixed in Mesh2HRTF v1.1.2