API Reference¶
- class reverberation_calc.DIN_18041_limits(room, type)¶
Bases:
object
Defines a “DIN_18041_limits” object that calculates the limits for reverberation time according to DIN 18041 based on room type, volume, and height.
Attributes¶
- roomroom
The room for which the limits are calculated, which is an instance of the room class
- volumefloat
The volume of the room in cubic meters
- cfloat
The speed of sound in air in meters per second, calculated based on the room’s temperature and pressure
- typestr
The type of room according to DIN 18041, specified as a string (e.g., “A1”, “B2”)
- T_sollfloat
The target reverberation time according to DIN 18041, calculated based on the room type, volume and height
- T_upper_limitnp.array
The upper limit for reverberation time according to DIN 18041, calculated based on the target reverberation time
- T_lower_limitnp.array
The lower limit for reverberation time according to DIN 18041, calculated based on the target reverberation time
Methods¶
- get_limits()
Calculates the limits for reverberation time according to DIN 18041 based on room type, volume and height.
- get_limits()¶
- class reverberation_calc.air_damp(frequency)¶
Bases:
object
Defines an “air_damp” object that calculates the sound absorption coefficient m in 1/m of air based on frequency, temperature, humidity, and pressure according to DIN EN ISO 354, based on alpha from ISO 9613-1.
Parameters¶
- frequencylist
A list of frequencies in Hz for which the sound absorption coefficient is calculated
- pressurefloat, optional
The pressure in kPa (default is 101.325)
- ref_pressurefloat, optional
The reference pressure in kPa (default is 101.325)
- rel_humidityfloat, optional
The relative humidity in percentage (default is 50)
- abs_humidityfloat, optional
The absolute humidity as molar conentration of water vapour in air as percentage according to ISO 9613-1 Annex B
- temperaturefloat, optional
The temperature in Celsius (default is 20)
- ref_temperaturefloat, optional
The reference temperature in Kelvin (default is 293.15, which is 20 degrees Celsius)
- alphalist
A list of sound absorption coefficients in dB/m, calculated based on the frequency, temperature, humidity and pressure
- mlist
A list of sound absorption coefficients in 1/m, calculated from alpha
Methods¶
- set_frequency(frequency)
Sets the frequency in Hz for which the sound absorption coefficient is calculated.
- set_pressure(pressure)
Sets the pressure in kPa for the sound absorption coefficient calculation.
- set_temperature(temperature)
Sets the temperature in Celsius for the sound absorption coefficient calculation.
- get_temperature()
Returns the temperature in Celsius.
- set_rel_humidity(rel_humidity)
Sets the relative humidity in percentage for the sound absorption coefficient calculation.
- calculate_abs_humidity()
Calculates the absolute humidity based on the relative humidity, pressure, and temperature.
- set_ref_pressure(ref_pressure)
Sets the reference pressure in kPa for the sound absorption coefficient calculation.
- calculate_coefficient()
calculates the sound absorption coefficient m in 1/m and alpha in dB/m of air based on frequency, temperature, humidity and pressure according to DIN EN ISO 354, based on alpha from ISO 9613-1.
- calculate_abs_humidity()¶
- calculate_coefficient()¶
- get_temperature()¶
- set_frequency(frequency)¶
- set_pressure(pressure)¶
- set_ref_pressure(ref_pressure)¶
- set_rel_humidity(rel_humidity)¶
- set_temperature(temperature)¶
- class reverberation_calc.material(name, absorption_coefficient)¶
Bases:
object
Defines a “material” object with properties such as name, absorption coefficient, and price.
Attributes¶
- namestr
The name of the material
- absorption_coefficientlist
The absorption coefficient of the material at different frequencies
- pricefloat, optional
The price of the material as €/m² (default is None)
Methods¶
- set_absorption_coefficient(absorption_coefficient)
Sets the absorption coefficient of the material.
- get_absorption_coefficient()
Returns the absorption coefficient of the material.
- set_name(name)
Sets the name of the material.
- get_name()
Returns the name of the material.
- set_price(price)
Sets the price of the material.
- get_price()
Returns the price of the material if it has been set, otherwise returns None.
- get_absorption_coefficient()¶
- get_name()¶
- get_price()¶
- set_absorption_coefficient(absorption_coefficient)¶
- set_name(name)¶
- set_price(price)¶
- class reverberation_calc.reverberation_time(room, surfaces, air_damp_calc=True, meas_reverberation_time=None)¶
Bases:
object
Defines a “reverberation_time” object that calculates the reverberation time of a room based on the extended Sabine formula from DIN EN ISO 354.
Attributes¶
- roomroom
The room for which the reverberation time is calculated, which is an instance of the room class
- surfaceslist
A list of surfaces in the room, each of which is an instance of the surface class
- frequency_bandslist
A list of frequency bands in Hz for which the reverberation time is calculated
- air_damp_calcbool, optional
A flag indicating whether air damping is considered in the calculation (default is True)
- Aeqfloat
The equivalent sound absorption area of the room, calculated based on the surfaces and their materials
- cfloat
The speed of sound in air in meters per second, calculated based on the room’s temperature and pressure
- volumefloat
The volume of the room in cubic meters
- air_dampair_damp
An instance of the air_damp class that calculates the sound absorption coefficient of air based on frequency, temperature, humidity, and pressure
- reverberation_timelist
The calculated reverberation time of the room in seconds
Methods¶
- calculate_Aeq()
Calculates the equivalent sound absorption area (Aeq) of the room based on the surfaces and their materials.
- calculate_reverberation_time()
Calculates the reverberation time of the room based on the extended Sabine formula, considering air damping if specified.
- calculate_Aeq()¶
- calculate_reverberation_time()¶
- class reverberation_calc.room(volume)¶
Bases:
object
Defines a “room” object with properties such as volume, temperature, pressure, relative humidity, and speed of sound.
Attributes¶
- volumeint
The volume of the room in cubic meters
- temperatureint
The temperature of the room in degrees Celsius (default is 20)
- pressureint
The pressure of the room in kilopascals (default is 101.325)
- rel_humidityint
The relative humidity of the room in percentage (default is 50)
- heightint, optional
The height of the room in meters (default is None)
- cfloat
The speed of sound in air in meters per second, calculated based on temperature and relative humidity
Methods¶
- set_volume(volume)
Sets the volume of the room.
- get_volume()
Returns the volume of the room.
- set_temperature(temperature)
Sets the temperature of the room.
- get_temperature()
Returns the temperature of the room.
- set_pressure(pressure)
Sets the pressure of the room.
- get_pressure()
Returns the pressure of the room.
- set_rel_humidity(rel_humidity)
Sets the relative humidity of the room.
- get_rel_humidity()
Returns the relative humidity of the room.
- set_height(height)
Sets the height of the room.
- get_height()
Returns the height of the room.
- get_c()
Calculates and returns the speed of sound in air based on the current temperature and relative humidity.
- get_c()¶
- get_height()¶
- get_pressure()¶
- get_rel_humidity()¶
- get_temperature()¶
- get_volume()¶
- set_height(height)¶
- set_pressure(pressure)¶
- set_rel_humidity(rel_humidity)¶
- set_temperature(temperature)¶
- set_volume(volume)¶
- class reverberation_calc.surface(name, area, material)¶
Bases:
object
Defines a “surface” object with properties such as name, area, and material.
Attributes¶
- namestr
The name of the surface
- areafloat
The area of the surface in square meters
- materialmaterial
The material of the surface, which is an instance of the material class
Methods¶
- set_area(area)
Sets the area of the surface.
- get_area()
Returns the area of the surface.
- set_material(material)
Sets the material of the surface.
- get_material()
Returns the material of the surface.
- set_surface_name(name)
Sets the name of the surface.
- get_surface_name()
Returns the name of the surface if it has been set, otherwise returns None.
- get_area()¶
- get_material()¶
- get_surface_name()¶
- set_area(area)¶
- set_material(material)¶
- set_surface_name(name)¶
- pages.home.add_row_to_flächen_tabelle(n_clicks, rows)¶
- pages.home.handle_table_interactions(active_cell, close_clicks, modal_is_open, table_data)¶
Handle interactions with the main table, including opening the modal and deleting rows.
Parameters¶
- active_celldict
The currently active cell in the table.
- close_clicksint
Number of clicks on the close button.
- modal_is_openbool
Current state of the modal.
- table_datalist
Current data in the table.
Returns¶
- new_modal_statebool
Updated state of the modal.
- new_modal_contentdash_html_components.Component
Content to display in the modal.
- new_table_datalist
Updated data for the table after deletion.
- pages.home.update_graph(room_usage, switch_value, volume, temp, height)¶
Update the graph based on user inputs.
Parameters¶
- room_usagestr
Selected room usage type.
- switch_valuebool
State of the toggle switch.
- volumefloat
Room volume in cubic meters.
- tempfloat
Room temperature in degrees Celsius.
- heightfloat
Room height in meters.
Returns¶
- figplotly.graph_objects.Figure
Updated figure with new data.