Universite-Gustave-Eiffel / I-Simpa

An Open Source software for 3D sound propagation modelling
https://i-simpa.univ-gustave-eiffel.fr/
GNU General Public License v3.0
227 stars 56 forks source link

Strange behavior for atmospheric implementation #263

Closed Picaut closed 3 years ago

Picaut commented 3 years ago

Describe the bug Using SPPS, and considering atmospheric absorption during propagation, the number of sound particles absorbed due to air absorption should be increased with the frequency.

To Reproduce Steps to reproduce the behavior:

  1. Create a simple geometry, with a sound source
  2. Compute SPPS calculation with atmospheric absorption checked
  3. Open 'SPPS particle statistics' file
  4. See the evolution of the number of sound particles absorbed by the atmosphere

Expected behavior This number of sound particles absorbed by the atmosphere should increase with frequency. For low frequency, this behavior is questioning

Screenshots See screenshot for an example

Desktop (please complete the following information): See 'About I-Simpa' for the Version and build

Additional context Seems we obtain the same results with older version of I-Simpa (2018)

image

Picaut commented 3 years ago

Here another example, for a perfectly specular room (no absorption, no diffusion). With atmospheric absorption. See the '.proj' file.

Very strange results. The number of particles absorbed by air should increase with the frequency.

image

Validation_atmospheric_absorption_simple.zip

nicolas-f commented 3 years ago

The probability of atmospheric apbsorption is computed here: https://github.com/Ifsttar/I-Simpa/blob/master/src/spps/CalculationCore.cpp#L57

This probability is computed here: https://github.com/Ifsttar/I-Simpa/blob/v1.3.3/src/lib_interface/data_manager/base_core_configuration.cpp#L121

Maybe the cause is the usage of float type instead of double. I will check this.

nicolas-f commented 3 years ago

You are in energetic mode. Particles does not disappear according to atmospheric absorption, they disappear if the energy remaining after 2 seconds of propagation is below a threshold defined in SPPS settings.

In your example, this threshold is reached starting with 8000 Hz.

Picaut commented 3 years ago

Yes, you are right for the second example. But for the first example, I have also considered the Energetic option. How particles can be absorbed by the atmosphere. Is due to the extinction of the energy at -10^5 ? Validation_atmospheric_absorption.zip

nicolas-f commented 3 years ago

Even if the materials have absorbed the majority of the energy of the particle but at the last step the atmospheric absorption put the energy below the set extinction value so it is marked as absorbed by the atmosphere.

Picaut commented 3 years ago

OK thank you. So this a bug, but the bug is me ! I close this comment.