Reflection

The reflection module contains functions for calculating reflection factors and impedances.

class acoustics.reflection.Boundary(frequency, flow_resistivity, density=1.296, soundspeed=343.0, porosity_decrease=120.0, specific_heat_ratio=1.4, angle=None, distance=None, impedance_model='db', reflection_model='plane')[source]

An object describing a boundary.

__init__(frequency, flow_resistivity, density=1.296, soundspeed=343.0, porosity_decrease=120.0, specific_heat_ratio=1.4, angle=None, distance=None, impedance_model='db', reflection_model='plane')[source]

Initialize self. See help(type(self)) for accurate signature.

angle = None

Angle of incidence \(\theta\).

density = None

Density of air \(\rho\).

Note

This value is only required for when calculating the impedance according to Attenborough’s model. See impedance_attenborough().

distance = None

Path length of the reflected ray \(r\).

Note

This value is only required for when calculating the spherical wave reflection factor. See reflection_factor_spherical_wave().

flow_resistivity = None

Flow resistivity \(\sigma\).

frequency = None

Frequency. Single value or vector for a frequency range.

impedance

Impedance according to chosen impedance model defined using impedance_model().

impedance_model = None

Impedance model.

Possibilities are 'db' and 'att' for respectively impedance_delany_and_bazley() and impedance_attenborough().

plot_impedance(filename=None)[source]

Plot magnitude and phase of the impedance as function of frequency.

plot_reflection_factor(filename=None)[source]

Plot reflection factor.

porosity_decrease = None

Rate of exponential decrease of porosity with depth \(\alpha\).

Note

This value is only required for when calculating the impedance according to Attenborough’s model. See impedance_attenborough().

reflection_factor

Reflection factor according to chosen reflection factor model defined using reflection_model().

reflection_model = None

Reflection factor model.

Possibilities are 'plane' and 'spherical'` for respectively reflection_factor_plane_wave() and reflection_factor_spherical_wave().

soundspeed = None

Speed of sound in air \(c\).

Note

This value is required when calculating the impedance according to Attenborough’s model or when calculating the spherical wave reflection factor. See respectively impedance_attenborough() and reflection_factor_spherical_wave().

specific_heat_ratio = None

Ratio of specific heats \(\gamma\) for air.

Note

This value is only required for when calculating the impedance according to Attenborough’s model. See impedance_attenborough().

wavenumber

Wavenumber \(k\).

\[k = \frac{2 \pi f}{c}\]
acoustics.reflection.DENSITY = 1.296

Density of air \(\rho\).

acoustics.reflection.POROSITY_DECREASE = 120.0

Rate of exponential decrease of porosity with depth \(\alpha\).

acoustics.reflection.SOUNDSPEED = 343.0

Speed of sound in air \(c\).

acoustics.reflection.SPECIFIC_HEAT_RATIO = 1.4

Specific heat ratio of air \(\gamma\).

acoustics.reflection.impedance_attenborough(frequency, flow_resistivity, density=1.296, soundspeed=343.0, porosity_decrease=120.0, specific_heat_ratio=1.4)[source]

Normalised specific acoustics impedance according to the two-parameter model by Attenborough.

Parameters:
  • frequency – Frequency \(f\).
  • flow_resistivity – Flow resistivity \(\sigma\).
  • soundspeed – Speed of sound in air \(c\).
  • density – Density of air \(\rho\).
  • porosity_decrease – Rate of exponential decrease of porosity with depth \(\alpha\).
  • specific_heat_ratio – Ratio of specific heats \(\gamma\) for air.

The impedance \(Z\) is given by

\[Z = \frac{\left( 1-j\right) \sqrt{\sigma/f}}{\sqrt{\pi \gamma_0 \rho_0}} - \frac{jc\alpha}{8 \pi \gamma_0 f}\]
acoustics.reflection.impedance_delany_and_bazley(frequency, flow_resistivity)[source]

Normalised specific acoustic impedance according to the empirical one-parameter model by Delany and Bazley.

Parameters:
  • frequency – Frequency \(f\).
  • flow_resistivity – Flow resistivity \(\sigma\).

The impedance \(Z\) is given by

\[Z = 1 + 9.08 \left( \frac{1000f}{\sigma}\right)^{-0.75} - 11.9 j \left( \frac{1000f}{\sigma}\right)^{-0.73}\]
acoustics.reflection.numerical_distance(impedance, angle, distance, wavenumber)[source]

Numerical distance \(w\).

Parameters:
  • impedance – Normalized impedance \(Z\).
  • angle – Angle of incidence \(\theta\).
  • distance – Path length of the reflected ray \(r\).
  • wavenumber – Wavenumber \(k\).

The numerical distance \(w\) is given by

\[w = \sqrt{-j k r \left( 1 + \frac{1}{Z} \cos{\theta} - \sqrt{1 - \left( \frac{1}{Z} \right)^2} \sin{\theta} \right) }\]
acoustics.reflection.reflection_factor_plane_wave(impedance, angle)[source]

Plane wave reflection factor \(R\).

Parameters:
  • impedance – Normalized impedance \(Z\).
  • angle – Angle of incidence \(\theta\).

The plane wave reflection factor \(R\) is given by

\[R = \frac{Z\cos{\theta}-1}{Z\cos{\theta}+1}\]

where \(Z\) is the normalized impedance and \(\theta\) the angle of incidence.

acoustics.reflection.reflection_factor_spherical_wave(impedance, angle, distance, wavenumber)[source]

Spherical wave reflection factor \(Q\).

Parameters:
  • impedance – Normalized impedance \(Z\).
  • angle – Angle of incidence \(\theta\).
  • distance – Path length of the reflected ray \(r\).
  • wavenumber – Wavenumber \(k\).

The spherical wave relfection factor \(Q\) is given by

\[Q = R \left(1 - R \right) F\]

where \(R\) is the plane wave reflection factor as calculated in reflection_factor_plane_wave() and \(F\) is given by

\[F = 1 - j \sqrt{ \pi} w e^{-w^2} \mathrm{erfc} \left( j w \right)\]

where \(w\) is the numerical distance as calculated in numerical_distance().