Impedance tube: complete circular, rectangular and square cross-section support (#380)
* Impedance tube: complete circular, rectangular and square cross-section support
The ISO 10534-2 branch already distinguished circular from rectangular
tubes; the ASTM E2611 branch ignored the cross-section entirely. Both
branches now cover it end to end:
- Accept "square" as a cross-section alias (the rectangular bound with
d the side length) in plane_wave_frequency_range() and
two_microphone_impedance().
- New plane_wave_frequency_range_astm(): ASTM E2611-19 working range
with the unrounded circular constant (fu d < 0.586 c, 6.2.4.1), the
rectangular bound (0.500 c, 6.2.5), the spacing bound (fu s < 0.40 c,
6.5.4) and the 1 % of wavelength lower limit (6.2.3).
- wave_decomposition(), transfer_matrix_two_load() and
transfer_matrix_one_load() accept diameter/shape and emit an
ImpedanceTubeWarning outside the plane-wave range (wavenumber-space
check, no speed of sound needed).
- New hydraulic_diameter(width, height) helper (4A/P) for the
tube_attenuation_constant() rectangular case (ISO 10534-2 A.2.1.5).
- ImpedanceTubeResult retains spacing/x1/diameter/shape and
TransferMatrix retains l1/s1/l2/s2/thickness/diameter/shape plus the
frequency vector and air characteristic impedance, so
TransferMatrix.plot() now works without arguments on solver-built
matrices.
- ReportMetadata.tube_shape prints a translated cross-section row on
the ISO 10534-2 fiche.
- Tests for every new path; materials guide (EN/ES), api-reference and
generated API pages updated.
* Address review: field order, spacing guard, plot docstring, message constant
- Append ReportMetadata.tube_shape after the original fields so the
public positional constructor order is unchanged.
- Validate s1/s2 inside _warn_astm_plane_wave so a zero spacing raises
ValueError instead of ZeroDivisionError from the two transfer-matrix
solvers.
- Reword TransferMatrix.plot() docstring: solver-built matrices retain
frequency and rho c, only hand-built ones must pass them.
- Hoist the duplicated diameter validation message into a module
constant (SonarCloud S1192).
authored by