noise_control.duct_modes
La referencia de la API se publica en inglés en los dos idiomas: se genera a partir de los docstrings del código, que son su texto original.
Higher-order acoustic modes in ducts, with the mean-flow cut-on shift.
Every plane-wave duct method has the same expiry date: the frequency at which
the first higher-order mode cuts on. Below it a duct carries only plane waves,
the four-pole (transfer-matrix) silencer algebra of
phonometry.noise_control.silencers is exact and a single sound pressure
describes the whole cross section. Above it several modes propagate at once,
each with its own axial wavenumber, and a plane-wave prediction quietly stops
being right.
This module implements the cut-on analysis of Norton & Karczub, Fundamentals of Noise and Vibration Analysis for Engineers 2nd ed., section 7.3:
- circular ducts (Eq. 7.6), , with the eigenvalues of Table 7.1 that solve (the first is 1.8412, which sets the plane-wave limit );
- rectangular ducts (Eq. 7.10), ;
- the mean-flow correction (Eq. 7.8): a uniform axial flow of Mach number
Mlowers every cut-on frequency by and moves the cut-on from to (Eq. 7.9), so the dispersion curve, symmetric about the frequency axis in still air, becomes asymmetric. For a turbulent rather than uniform profile Norton notes that replacingMby the centre-line Mach numberM_0represents the convective effect adequately.
The practical consequence in a ventilation duct is blunt: a 0.65 m x 0.4 m
air-conditioning duct cuts on at 264 Hz, so plane-wave silencer algebra is
valid only in the 63 Hz to 250 Hz octaves. plane_wave_limit returns
that frequency, and the silencer and duct-path results raise
PlaneWaveWarning on the caller’s behalf above it.
Auto-generated from the source docstrings by
scripts/generate_api_docs.py(make api-docs). Do not edit by hand.
circular_duct_cut_on
Section titled “circular_duct_cut_on”circular_duct_cut_on( diameter_m: float, *, flow_velocity: float = 0.0, speed_of_sound: float = 343.0, n_modes: int | np.integer[Any] = 6,) -> DuctModeResultCut-on frequencies of the higher-order modes of a circular duct.
Norton & Karczub Eq. 7.6 with the Table 7.1 eigenvalues, corrected for a uniform axial mean flow by Eqs. 7.8 and 7.9:
The flow lowers every cut-on frequency and shifts the cut-on away from
: the mode is already travelling upstream, against the
flow, at
the frequency at which it appears. Only the first twelve modes are
tabulated by Norton, so n_modes cannot exceed twelve.
Parameters
| Name | Description |
|---|---|
diameter_m |
Internal duct diameter, m (a_i is half of it). |
flow_velocity |
Mean axial flow speed U, m/s (0 for still air; use the centre-line speed for a turbulent profile). |
speed_of_sound |
Speed of sound c in the duct fluid, m/s. |
n_modes |
How many higher-order modes to return, 1 to 12. |
Returns: A DuctModeResult.
Raises
| Exception | When |
|---|---|
| ValueError | For a non-positive diameter, a sonic or supersonic flow, or an n_modes that is not a whole number from 1 to 12. |
| TypeError | if diameter_m, flow_velocity or speed_of_sound is not a single number, or n_modes is a flag, a text or an array where a count goes. |
DuctModeResult
Section titled “DuctModeResult”DuctModeResult( modes: tuple[tuple[int, int], ...], cut_on: NDArray[np.float64], cut_on_no_flow: NDArray[np.float64], axial_wavenumber: NDArray[np.float64], mach: float, section: Literal['circular', 'rectangular'], label: str,)Cut-on frequencies of the higher-order acoustic modes of a duct.
Attributes
| Name | Description |
|---|---|
modes |
Mode orders (p, q), ordered by ascending no-flow cut-on frequency. |
cut_on |
Cut-on frequency of each mode with the mean flow applied, Hz. |
cut_on_no_flow |
Cut-on frequency of each mode in still air, Hz. |
axial_wavenumber |
Axial wavenumber k_x at cut-on, 1/m (zero without flow, negative with it). |
mach |
Mean-flow Mach number . |
section |
"circular" or "rectangular". |
label |
A short human label of the duct. |
DuctModeResult.plane_wave_limit
Section titled “DuctModeResult.plane_wave_limit”property
The lowest cut-on frequency, Hz: plane waves only below it.
DuctModeResult.plot()
Section titled “DuctModeResult.plot()”DuctModeResult.plot( ax: Axes | None = None, *, language: Literal['en', 'es'] = 'en', **kwargs: Any,) -> AxesPlot the cut-on ladder, with and without flow, over the mode order.
Requires matplotlib (the [plot] extra).
Parameters
| Name | Description |
|---|---|
ax |
Existing axes, or None to create a figure. |
language |
Label language, "en" (default) or "es". |
kwargs |
Forwarded to the with-flow Axes.plot. |
Returns: The axes.
plane_wave_limit
Section titled “plane_wave_limit”plane_wave_limit( *, diameter_m: float | None = None, width_m: float | None = None, height_m: float | None = None, area: float | None = None, flow_velocity: float = 0.0, speed_of_sound: float = 343.0,) -> floatThe first cut-on frequency of a duct: plane waves only below it.
A convenience over circular_duct_cut_on and
rectangular_duct_cut_on that takes whichever description of the
cross section is at hand. Give either diameter_m, or both width_m and
height_m, or area (treated as a circular duct of the equivalent
diameter ).
Parameters
| Name | Description |
|---|---|
diameter_m |
Internal diameter of a circular duct, m. |
width_m |
Cross-sectional dimension a of a rectangular duct, m. |
height_m |
Cross-sectional dimension b of a rectangular duct, m. |
area |
Cross-sectional area, m2, for a duct described by its area. |
flow_velocity |
Mean axial flow speed U, m/s. |
speed_of_sound |
Speed of sound c, m/s. |
Returns: The lowest cut-on frequency, Hz.
Raises
| Exception | When |
|---|---|
| ValueError | If the cross section is not described exactly once. |
| TypeError | if area is not a single number. |
PlaneWaveWarning
Section titled “PlaneWaveWarning”A plane-wave duct method is evaluated above the first cut-on frequency.
Raised by the results that assume one-dimensional propagation (the reactive silencers, the duct-path cascade) when the analysis reaches frequencies at which higher-order modes propagate in the duct cross section. The numbers are still returned: above cut-on they describe the plane-wave mode only, and a measurement will show the extra modes.
rectangular_duct_cut_on
Section titled “rectangular_duct_cut_on”rectangular_duct_cut_on( width_m: float, height_m: float, *, flow_velocity: float = 0.0, speed_of_sound: float = 343.0, n_modes: int | np.integer[Any] = 3,) -> DuctModeResultCut-on frequencies of the higher-order modes of a rectangular duct.
Norton & Karczub Eq. 7.10, with the same convective factor as the circular case:
where a and b are the cross-sectional dimensions and (p, q)
the mode order; (0, 0) is the plane wave and is excluded. The modes are
returned in ascending cut-on order, so the first is always the half
wavelength across the wider side.
Parameters
| Name | Description |
|---|---|
width_m |
Cross-sectional dimension a, m. |
height_m |
Cross-sectional dimension b, m. |
flow_velocity |
Mean axial flow speed U, m/s. |
speed_of_sound |
Speed of sound c in the duct fluid, m/s. |
n_modes |
How many higher-order modes to return (at least 1). |
Returns: A DuctModeResult.
Raises
| Exception | When |
|---|---|
| ValueError | For non-positive dimensions, a sonic or supersonic flow, or an n_modes that is not a whole number from 1. |
| TypeError | if flow_velocity, height_m, speed_of_sound or width_m is not a single number, or n_modes is a flag, a text or an array where a count goes. |