acdecom.WaveGuide

class acdecom.WaveGuide(dimensions, **kwargs)

This class can be used to decompose in-duct sounds into acoustic modes. It can be used for experimental data and for numeric data.

Parameters for initialization:

Parameters
  • dimensions (array_like) –

    The dimensions of the waveguide.
    • For a circular duct, dimensions is (radius, ).

    • For a rectangular duct, dimension is (dimension x, dimension y).

    • For any other shape, dimensions can be specified in the same way (dimension 1, dimension 2, …).

  • temperature (float, optional) – Temperature in Kelvin of the medium inside the waveguide. Defaults to T 293.15.

  • M (float, optional) – Bulk Mach_number in \(z_+\) direction. Defaults to 0.

  • flip_flow (boolean, optional) – If True, it changes the flow-direction from \(z_+\) to \(z_-\) direction. A negative Mach number has the same effect. Defaults to False.

  • damping ({"no", "kirchoff","dokumaci"}, optional) –

    Choose one of the pre-defined acoustic dispersion models. Defaults to “no”.

  • distance (float) – The distance between the decomposition cross section and the first microphone. Defaults to 0.

  • cross_section ({"circular","rectangular","custom"}, optional) – Choose one of the pre-defined duct profiles. Defaults to “circular”. If set to “custom” the methods WaveGuide.get_c(), WaveGuide.get_psi() , and WaveGuide.get_wavenumber() should be customized.

  • f_max (float, optional) – If set, all propagating modes up to the frequency f_max [Hz] are pre-computed and decompositions run faster. Defaults to 1000.

  • gas_constant (float, optional) – The ideal gas constant of the medium inside the waveguide. Defaults to 287.053072.

  • dynamic_viscosity (float, optional) – The dynamic viscosity of the medium inside the waveguide. Defaults to 10.13e-6.

  • pressure (float, optional) – The static pressure of the medium inside the waveguide. Defaults to 101.000.

  • heat_capacity (float, optional) – The heat capacity ratio of the medium inside the waveguide. Defaults to 1.401.

  • thermal_conductivity (float, optional) – The thermal conductivity of the medium inside the waveguide. Defaults to 0.02587.

  • eigenvalue (functional, optional) – Uses an external function to compute the eigenvalues. If not specified, the cross section specific function is used. If a custom cross section is specified, the eigenvalue defaults to 1.

  • modeshape (functional, optional) – Uses an external function to compute the mode shapes. If not specified, the cross section specific function is used. If a custom cross section is specified, the mode shapee defaults to 1.

  • wavenumber (functional, optional) – Uses an external function to compute the wavenumber. If not specified, the cross section specific function is used. If a custom cross section is specified, the wavenumber defaults to the wavenumber for a circular duct.

  • normalization (functional, optional) – Uses an external function to compute the normalization factor for the mode shapes. If not specified, the cross section specific function is used. If a custom cross section is specified, the mode shapee normalization defaults to 1.

Methods

K0_dokumaci(m, n, f, **kwargs)

Dissipation function for the wavenumber based on Dokumaci’s thermo-viscous dissipation in waveguides with flow and higher-order modes.

K0_kirchoff(m, n, f, **kwargs)

Dissipation function for the wavenumber based on Kirchoff’s thermo-viscous dissipation in waveguides without flow.

K0_stinson_circular(m, n, f, **kwargs)

Dissipation function for the wavenumber based on Stinson’s thermo-viscous dissipation in circular waveguides without flow.

K0_stinson_rect(m, n, f, **kwargs)

Dissipation function for the wavenumber based on Stinson’s thermo-viscous dissipation in rectangular waveguides without flow.

__init__(dimensions, **kwargs)

Parameters for initialization:

decompose(data, f_col, probe_col[, …])

Decompose sound fields into modal components.

find_cuton(f, **kwargs)

Returns the number of cut-on modes for the specified frequency f Hz.

get_K0(m, n, f, **kwargs)

Placeholder for the dissipation function for the wavenumber.

get_T(m, n, f, z, **kwargs)

Returns the mode-propagation \(T_{i\pm}(z)\).

get_c(m, n, **kwargs)

Placeholder for the normalization of the mode shapee of the (m,n)-mode.

get_c_circular(m, n, **kwargs)

Return the normalization of the (m,n)-mode for a circular duct.

get_c_rect(m, n, **kwargs)

Return the normalization of the (m,n)-mode for a rectangular duct.

get_domainvalues()

Returns the characteristic properties of the waveguide and the medium.

get_eigenvalue(m, n, **kwargs)

Placeholder for the eigenvalue of the (m,n)-mode.

get_eigenvalue_circular(m, n, **kwargs)

Returns the eigenvalue of the (m,n)-mode for a circular duct.

get_eigenvalue_rect(m, n, **kwargs)

Returns the eigenvalue of the (m,n)-mode for a rectangular duct.

get_kappa(m, n)

Returns the eigenvalues of the (m,n)-mode.

get_modalmatrix(f, **kwargs)

Returns the modal matrix that can be used for the mode decomposition.

get_psi(m, n, pos1, pos2, **kwargs)

Placeholder for the normalized mode shapes of the (m,n)-mode.

get_psi_circular(m, n, r, phi, **kwargs)

Return the normalized mode shapee of the (m,n)-mode for a circular duct.

get_psi_rect(m, n, x, y)

Return the normalized mode shapee of the (m,n)-mode for a rectangular duct.

get_radius()

Returns the radius or an equivalent measure for the waveguide.

get_wavenumber(m, n, f, **kwargs)

Compute the wavenumber of the (m,n)-mode at the frequency f [Hz].

read_microphonefile(filename[, …])

Reads a file that contains the microphone position.

set_distance(d)

Sets the distance between the first microphone and the decomposition cross section.

set_flip_flow(flip_flow)

Set the flow direction.

set_microphone_positions(posz, pos1, pos2[, …])

Sets the positions for the pressure probes.

set_temperature_pressure([t, p0])

Sets the temperature and pressure in the waveguide.