treble_tsdk.material.material_fitting¶
Classes
Random incidence absorption coefficients for full octave bands. |
|
Builder for creating layered acoustic materials from physical properties. |
|
Definition of acoustic material properties for simulation. |
|
The types of request to send to the material fitter based on each of the input types |
|
Random incidence absorption coefficients for 1/3rd octave bands. |
|
Definition for creating porous absorber materials. |
|
Complex reflection coefficient for acoustic material characterization. |
|
Complex surface impedance for acoustic material characterization. |
|
Types of porous absorber wools available |
Exceptions
Exception raised for invalid material input parameters. |
- exception treble_tsdk.material.material_fitting.MaterialInputException¶
Exception raised for invalid material input parameters.
- __init__(message)¶
- with_traceback()¶
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
- args¶
- class treble_tsdk.material.material_fitting.AbsorptionCoefficients¶
Random incidence absorption coefficients for full octave bands.
Represents absorption coefficients at standard octave band center frequencies (63, 125, 250, 500, 1000, 2000, 4000, 8000 Hz). Each coefficient must be between 0.01 and 0.95.
- __init__(coefficients: np.ndarray | list)¶
Random incidence absorption coefficients for full octave bands. The list of coefficients needs to match the central band frequencies and each coefficient should be between 0.01 and 0.95. The coefficients will be rounded to two decimal points.
Frequencies: [63, 125, 250, 500, 1000, 2000, 4000, 8000]
- Parameters:
coefficients (np.ndarray | list) – List of random incidence absorption coefficients.
- property request_info¶
- class treble_tsdk.material.material_fitting.MaterialBuilder¶
Builder for creating layered acoustic materials from physical properties.
Allows construction of materials layer by layer, starting from a rigid backing and adding air cavities and porous absorber layers. Supports field incidence averaging for more realistic absorption predictions.
- __init__(density: float | None = None, bulk_modulus: float | None = None, field_incidence: bool = False, angle_range: tuple[int, int] = (0, 78))¶
Use this class to build up materials from a starting point of a rigid backing. The material has to have some starting point (this is the reason for the rigid backing). Optional input parameters include density and bulk modulus of the rigid backing but both need to be input for them to be used
Use this class by building materials form back to front by adding new material components on top of the one beneath.
Currently we offer air gaps and porous materials (rockwool or glasswool)
- Parameters:
density (float | None) – Density of rigid backing in kg/m3
bulk_modulus (float | None) – Bulk modulus of rigid backing in Pa
field_incidence (bool) – Adding field incidence averaging to material, defaults to False
angle_range (tuple[int, int]) – The angles (in degrees) to average over if field incidence is True, defaults to (0, 78)
- append_air_cavity(thickness_in_mm: float)¶
Append an air cavity to a material
- Parameters:
thickness_in_mm (float) – Thickness in mm
- append_porous_absorber(thickness_in_mm: float, flow_resistivity: float | None = None, density: float | None = None, wool_type: WoolType | None = WoolType.rock_wool)¶
Add a porous absorbing layer to a material. One of flow resistivity and density need to be given.
- Parameters:
thickness_in_mm (float) – Thickness of layer in mm
flow_resistivity (float | None) – The flow resistivity in [Pa s / m2], if not given then density needs to be given, defaults to None
density (float | None) – Density in kg/m3, if not given then flow resistivity needs to be given, defaults to None
wool_type (WoolType | None) – Wool type (used for mapping between density and flow resistivity) available are rock wool and glass wool, defaults to WoolType.rock_wool
- property request_info¶
- class treble_tsdk.material.material_fitting.MaterialDefinition¶
Definition of acoustic material properties for simulation.
Defines material properties based on absorption coefficients, reflection coefficients, or surface impedance. Used for performing material fitting to create materials compatible with Treble solvers.
- __init__(name: str, category: MaterialCategory, material_type: MaterialRequestType, coefficients: numpy.ndarray, default_scattering: float | None = 0.1, description: str | None = '', specific_impedance: bool | None = False, tags: Sequence[str] | str | None = None)¶
The material properties are defined based on given material_type. This material definition can be used for performing material fit which outputs materials usable by the Treble solvers.
- Parameters:
name (str) – Name of the material
category (MaterialCategory) – Category of material
material_type (MaterialRequestType) – Type of the material. Possible values are full_octave_absorption, third_octave_absorption, reflection_coefficient and surface_impedance
coefficients (np.ndarray) – For material types full_octave_absorption and third_octave_absorption this is an array of random incidence absorption coefficients (np.array[float]). For material type reflection_coefficient this is a complex reflection coefficient array (np.array[complex]). For material type surface_impedance this is a complex surface impedance array (np.array[complex]).
default_scattering (float | None) – Default scattering value of material the scattering can be modified when assigning to a surface, defaults to 0.1
description (str | None) – Description of material, defaults to “”
specific_impedance (bool | None) – Only used for material type SurfaceImpedance. Put to true if the input surface impedance is the specific acoustic impedance, defaults to False
tags (list[str] | str | None) – Tags for the material, can be a single string, comma-separated string (e.g., “tag1, tag2”), or list of strings, defaults to None
tags – Tags for the material, can be a single string, comma-separated string (e.g., “tag1, tag2”), or list of strings, defaults to None
- property request¶
- class treble_tsdk.material.material_fitting.MaterialRequestType¶
The types of request to send to the material fitter based on each of the input types
- full_octave_absorption = 'FullOctaveAbsorption'¶
- material_builder = 'MaterialBuilder'¶
- reflection_coefficient = 'ReflectionCoefficient'¶
- surface_impedance = 'SurfaceImpedance'¶
- third_octave_absorption = 'ThirdOctaveAbsorption'¶
- class treble_tsdk.material.material_fitting.OneThirdOctaveAbsorptionCoefficients¶
Random incidence absorption coefficients for 1/3rd octave bands.
Represents absorption coefficients at 1/3rd octave band center frequencies from 50 Hz to 10000 Hz. Each coefficient must be between 0.01 and 0.95.
- __init__(coefficients: np.ndarray | list)¶
Random incidence absorption coefficients for 1/3rd octave bands. The list of coefficients needs to match the central band frequencies of the 1/3rd octave bands and each coefficient should be between 0.01 and 0.95. The coefficients will be rounded to two decimal points.
- Frequencies: [50, 63, 80, 100, 125, 160, 200, 250, 320, 400, 500, 640,
800, 1000, 1250, 1600, 2000, 2500, 3200, 4000, 5000, 6400, 8000, 10000]
- Parameters:
coefficients (np.ndarray | list) – List of random incidence absorption coefficients.
- property request_info¶
- class treble_tsdk.material.material_fitting.PorousMaterialBuilderDefinition¶
Definition for creating porous absorber materials.
Simplified interface for creating porous materials with optional air cavity backing. Supports specification via flow resistivity or density with wool type mapping.
- __init__(name: str, category: MaterialCategory, porous_layer_thickness: float, air_cavity_layer_thickness: float | None = 0, flow_resistivity: float | None = None, density: float | None = None, wool_type: WoolType | None = None, description: str | None = '', default_scattering: float | None = 0.1, tags: Sequence[str] | str | None = None, field_incidence: bool = False, angle_range: tuple[int, int] = (0, 78))¶
This material definition can be used for creating a porous material which outputs materials usable by the Treble solvers.
- Parameters:
name (str) – Name of the material
category (MaterialCategory) – Category of material
porous_layer_thickness (float) – Thickness of the porous layer in mm
air_cavity_layer_thickness (float | None) – Thickness of the air cavity in mm, if provided then an air cavity layer is added
flow_resistivity (float | None) – Flow resistivity in [Pa s / m2]
density (float | None) – Density in kg / m3
wool_type (WoolType | None) – Type of wool, either glass wool or rock wool
description (str | None) – Description of material, defaults to “”
default_scattering (float | None) – Default scattering value of material the scattering can be modified when assigning to a surface, defaults to 0.1
tags (list[str] | str | None) – Tags for the material, can be a single string, comma-separated string (e.g., “tag1, tag2”), or list of strings, defaults to None
field_incidence (bool) – Adding field incidence averaging to material, defaults to False
angle_range (tuple[int, int]) – The angles (in degrees) to average over if field incidence is True, defaults to (0, 78)
- property request¶
- class treble_tsdk.material.material_fitting.ReflectionCoefficient¶
Complex reflection coefficient for acoustic material characterization.
Represents the complex reflection coefficient at 1/3rd octave band frequencies from 50 Hz to 10000 Hz. The modulus must be less than 1 for all frequencies.
- __init__(reflection_coefficient: numpy.ndarray)¶
Complex reflection coefficient. The array needs to coincide with the third octave band frequencies from 50 hz to 10_000 hz.
The modulus of the coefficient needs to be smaller than 1 for every frequency.
- Frequencies: [50, 63, 80, 100, 125, 160, 200, 250, 320, 400, 500, 640,
800, 1000, 1250, 1600, 2000, 2500, 3200, 4000, 5000, 6400, 8000, 10000]
- Parameters:
reflection_coefficient (np.ndarray) – The complex reflection coefficient
- property request_info¶
- class treble_tsdk.material.material_fitting.SurfaceImpedance¶
Complex surface impedance for acoustic material characterization.
Represents the complex surface impedance at 1/3rd octave band frequencies from 50 Hz to 10000 Hz. Can be specified as absolute or specific impedance.
- __init__(surface_impedance: numpy.ndarray, specific_impedance: bool | None = False)¶
Complex surface impedance. The array needs to coincide with the third octave band frequencies from 50 hz to 10_000 hz. Can be specific impedance or absolute impedance.
- Frequencies: [50, 63, 80, 100, 125, 160, 200, 250, 320, 400, 500, 640,
800, 1000, 1250, 1600, 2000, 2500, 3200, 4000, 5000, 6400, 8000, 10000]
- Parameters:
surface_impedance (np.ndarray) – Third octave complex surface impedance
specific_impedance (bool | None) – Put to true if the input surface impedance is the specific acoustic impedance, defaults to False
- property request_info¶