pyroomacoustics icon indicating copy to clipboard operation
pyroomacoustics copied to clipboard

Room modeling with complex geometries and different boundary conditions on walls

Open lucpdi opened this issue 11 months ago • 8 comments

Hello,

For my research, I am working on the validation of performance and usability of different open-source room acoustics modeling software. Included in this research will be PyRoomAcoustics.

To have a reproducible result, I am using rooms from the BRAS database [source]. These are real rooms, which means that they are not necessarily shoebox shaped and could have multiple materials on one wall (for example, a hard wall with windows). I wanted to be able to model these different real world scenarios, but I was not able to find an example capable of this. Therefore, I developed by own example.

Below code is a combination of the following provided examples:

room_complex_wall_materials.py room_from_stl.py

Furthermore, I implemented a method to assign different materials from the materials dictionary to the corresponding mesh vectors based on the build order of the mesh from the .geo file. I made sure to check the order using gmsh [source]. This method is an implementation of the suggested method from issue #260.

I wanted to provide the user the possibility to control all necessary settings, which is why I implemented these settings in the 'user input' part of the code.

After the simulation, the RIR's will be saved as .wav files. I think I developed this myself, but since it was developed a while ago I am not certain. If I missed giving anyone any credit, please post a comment and I will add this to this description.

Finally, I want to ask anyone interested to check this implementations and provide your feedback about any issues you might encounter. I want to present a reproducible and correct result in my research, which is why this is important. In addition, if you feel like you miss important user settings, please let me know so I can add this to the code.

Best, lucpdi

20250128_pra_RIR-from-stl_multiple-complex-material_v1.6.txt

@fakufaku

lucpdi avatar Jan 28 '25 08:01 lucpdi

Hi @lucpdi, could you please advise on where I can find geo/stl files for common home environments? The stl files I find online are always too complex and cannot be used properly. Additionally, besides PyRoomAcoustics, are there any other recommended open-source room acoustics modeling software?

coreeey avatar Feb 10 '25 03:02 coreeey

Hi @coreeey,

I used the room from the BRAS database for my research, although I found the provided 3d models too detailed.

You could model your own rooms using Sketchup. You might also be able to model a room using the open source alternative FreeCAD, although I do not have experience using this software. I expect this might work with the script above since you can also export *.obj files from FreeCAD. If you decide to use this, I would love to hear back your experience.

If you use the above script, I would love to hear back your experience and suggestions for improving the usability.

Besides PRA you could also take a look at I-Simpa, which is another open-source room acoustics simulation software based on geometrical acoustics.

lucpdi avatar Feb 11 '25 08:02 lucpdi

@lucpdi Thank you so much for sharing your work, and sorry for the late reply. This is very cool, and I would be interested to add this as an example to the repository. Would you happen to have an example STL file with the materials you used? I could also add them to the repo together with the example.

fakufaku avatar Feb 15 '25 03:02 fakufaku

Hi @fakufaku,

That's really nice! Thanks!

Please find a zip with the supplementary files below. This zip includes:

  • Room model | Original Sketchup (*.skp) file, *.obj file exported from Sketchup, and the *.stl file converted from the *.obj file. The room model is a simplified version of the original from the BRAS database, available here.
  • Boundary conditions | Fitted estimates from the BRAS database, available here.
  • Source and receiver positions | In accordance with the original positions from the BRAS database, available here

The BRAS database also includes measurement data from the room.

I would love to hear feedback on the script.

Best, lucpdi

Supp_materials_BRAS_CR2.zip

lucpdi avatar Feb 18 '25 08:02 lucpdi

Hey @fakufaku,

Did you manage to take a look at the script yet? What do you think of it and is it fully correct?

Thanks for your feedback!

lucpdi avatar Mar 07 '25 20:03 lucpdi

@lucpdi Sorry, I've been underwater for the past couple of months. I am trying to catch up with things here now.

fakufaku avatar May 18 '25 07:05 fakufaku

Hey @lucpdi , I'm testing the script. That sounds pretty good! If you agree I'd like to add this to the examples in the repo (you will be credited of course!). Would it be ok to share the obj and stl files along the code?

fakufaku avatar May 23 '25 14:05 fakufaku

In the script, I would just increase the number of rays to get a smoother RIR. It takes a little longer to simulate but sounds better I think. I am using 30000 right now (but did not do extensive tests).

fakufaku avatar May 23 '25 14:05 fakufaku