Ir al contenido
Esta documentación describe la versión 4.0.0, todavía sin publicar. La versión actual en PyPI es la 3.3.0 y no incluye todo lo que se describe aquí.

noise_control.silencer_measurement

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.

Insertion loss of a ducted silencer, measured by substitution.

Everything a silencer model computes comes from geometry. The figure a supplier publishes does not: it is an insertion loss measured by substitution, and this module is the arithmetic of that measurement.

Three standards describe how a duct element is measured in a laboratory. Two of them share the substitution method and differ only in how much rigour they ask:

  • ISO 7235:2003 (published in Europe as EN ISO 7235:2009) is the full procedure, with a modal filter between the source and the test object, a qualified receiving side, and a stated measurement uncertainty. It covers silencers, air-terminal units and other duct elements, with and without flow.
  • ISO 11691:1995 (EN ISO 11691:2009) is the survey-grade laboratory method, six printed pages carrying two equations. It measures silencers and nothing else, without flow and with none in the answer, up to a design velocity of 15 m/s. A measurement that needs flow, or an object that is not a silencer, is outside it and belongs to ISO 7235.

The third measures a different quantity by a different route. ISO 5135:1999 (EN ISO 5135:1998) determines the sound power an air-terminal device, air-terminal unit, damper or valve radiates, in a reverberation room to ISO 3741, and hands back the power in the duct behind it with the end reflection loss of its Equation (2). That equation is Equation (B.3) of ISO 7235 written out again, character for character, and its solid-angle table is Table B.1: open_end_transmission_loss is both. What ISO 5135 adds of its own is fit_operating_line, the straight line 5.5.2 fits through the test points so that a level can be read off at a duty the laboratory did not measure at.

The measurement is the same subtraction in both. Run the rig once with a plain substitution duct in place of the silencer, run it again with the silencer installed, and take the difference band by band:

where is the series with the test object and the series with the substitution duct. ISO 11691 writes the same thing as with the substitution duct first, and ISO 7235 6.3 adds the reverberation-time term when the receiving room’s absorption moved between the two series. substitution_insertion_loss is all three.

What the subtraction is not is a transmission loss. It is measured against a particular substitution duct in a particular rig, so it carries the rig with it: the flanking path along the duct walls sets a limiting insertion loss the facility cannot measure past, and the receiving side decides how much of the sound the microphones see at all. A catalogue figure is a claim about the arrangement as much as about the device, which is why ISO 7235 makes the arrangement reportable.

The rest of the module is the bookkeeping that goes with the subtraction:

The open end of the duct is the other half. A duct radiating into a room does not hand the room everything that reaches its mouth: at low frequency the mouth is a poor radiator and reflects most of the energy back up the duct. open_end_transmission_loss is Equation (B.3), which is what stands between the level measured in a reverberation room and the level travelling in the duct, and it is needed twice over: by the transmission loss of Equation (6) and by the flow-noise sound power of Equation (7).

The plane-wave modelling this measurement is compared against lives in phonometry.noise_control.silencers, and the cut-on frequency above which a duct stops carrying plane waves alone is in phonometry.noise_control.duct_modes.

Auto-generated from the source docstrings by scripts/generate_api_docs.py (make api-docs). Do not edit by hand.

average_pressure_loss_coefficient(
object_static_pressure_pa: ArrayLike,
object_dynamic_pressure_pa: ArrayLike,
substitution_static_pressure_pa: ArrayLike,
substitution_dynamic_pressure_pa: ArrayLike,
) -> float

ISO 7235 Equation (18): the substitution method, averaged.

The fundamental method of 6.5.2.2 is a substitution measurement like the acoustic one: run the rig with the test object and again with the substitution duct, and the difference belongs to the object. The computational route of 6.5.2.2.3 does it on the coefficients rather than on the pressures, so the two series need not be run at matching flow rates and need not even have the same number of points.

Each series is at least five airflow rates spread over the test range, and the lowest has to produce more than MINIMUM_PRESSURE_DIFFERENCE_PA.

Parameters

NameDescription
object_static_pressure_pa, the upstream static pressures of the series with the test object, in Pa.
object_dynamic_pressure_pa of that series, in Pa, from dynamic_pressure.
substitution_static_pressure_pa of the series with the substitution duct, in Pa.
substitution_dynamic_pressure_pa of that series, in Pa.

Returns: , dimensionless.

Raises

ExceptionWhen
ValueErrorIf a value is not finite, if a dynamic pressure is not positive, or if a series’ two arrays are of different lengths.

Warns

WarningWhen
SilencerMeasurementWarningIf either series has fewer points than the five 6.5.2.2.1 asks for.

Constant (float).

CIRCULAR_CUT_ON_COEFFICIENT = 0.59

Constant (tuple).

DENSITY_RATIO_RANGE = (0.98, 1.02)
duct_sound_power_level(
room_sound_power_level: ArrayLike,
end_reflection_loss: ArrayLike,
) -> NDArray[np.float64]

ISO 5135 Equation (1): back from the room to the duct.

An air-terminal device is measured by what it radiates into a reverberation room, and what a designer needs is what it puts into the duct behind it. The two differ by the end reflection loss of the open duct, which is Equation (2) of ISO 5135 and, written out, is exactly Equation (B.3) of ISO 7235: the same formula, the same solid-angle table, two names. open_end_transmission_loss is both.

The NOTE to Table 1 offers a way out of the correction rather than a second formula for it: a transmission element to ISO 7235 may be fitted instead, and then no correction is applied at all.

Parameters

NameDescription
room_sound_power_level, the sound power radiated into the room, in dB, from ISO 3741.
end_reflection_loss, in dB, from open_end_transmission_loss.

Returns: , in dB, one value per band.

Raises

ExceptionWhen
ValueErrorIf a value is not finite, or if the two arrays carry different numbers of bands. Both are per-band quantities, so neither stands in for a whole run.
dynamic_pressure(volume_flow: float, area: float, density: float) -> float

ISO 7235 Equations (13), (16), (19) and (20): the velocity head.

One equation printed four times, once for each place the pressure loss coefficient needs it: the inlet of the simplified method (13), the chosen mid-range point of the fundamental method (16), and the two series of the computational route (19) and (20). The group is the face velocity, so this is with the velocity written the way a flow meter reports it.

Parameters

NameDescription
volume_flow, in m³/s.
area, the cross-sectional area the flow passes, in m².
density, in kg/m³.

Returns: , in Pa.

Raises

ExceptionWhen
ValueErrorIf a value is not positive and finite.

Constant (float).

EXTRAPOLATION_MAX_DEVIATION_DB = 3.0

Constant (tuple).

EXTRAPOLATION_RANGE_FACTORS = (0.5, 2.0)
fit_operating_line(duty: ArrayLike, levels: ArrayLike) -> OperatingLine

ISO 5135 5.5.2: the least-squares line through the test points.

The abscissa is the logarithm of the duty, which is the volume flow rate when the tests were made at a constant pressure loss coefficient and the total pressure loss when they were made at a constant flow rate. The ordinate is the band level or the A-weighted level, and the same fit serves both.

Parameters

NameDescription
duty in m³/s or in Pa, one per test point, at least two of them.
levelsThe level at each of those points, in dB.

Returns: An OperatingLine.

Raises

ExceptionWhen
ValueErrorIf a duty is not positive and finite, if a level is not finite, if the two arrays are of different lengths, if there are fewer than two points, or if every point is at the same duty.

Warns

WarningWhen
SilencerMeasurementWarningIf a point lies further from the line than the 3 dB of 5.5.2.
flow_noise_power_level(
pressure_level: ArrayLike,
open_end_loss: ArrayLike,
room_correction: ArrayLike,
) -> NDArray[np.float64]

ISO 7235 Equation (7): the sound power of the flow noise.

Three terms, and each is a different kind of quantity. is the spatial energy-average level measured in the reverberation room, and 6.4 is explicit that it is taken without a background correction, because the two series are reported separately and the reader subtracts them. puts back what the open end of the duct kept in. is the level difference between the sound power radiated into the room and the average pressure in it, which ISO 3741 supplies from the room’s volume and reverberation time.

Parameters

NameDescription
pressure_level, in dB, per band.
open_end_loss, in dB, from open_end_transmission_loss.
room_correction, in dB, per band or one value for all.

Returns: , in dB, one value per band.

Raises

ExceptionWhen
ValueErrorIf a value is not finite, if the level and the open-end loss carry different numbers of bands, or if the room correction is neither a single value nor one per band.

Constant (tuple).

ISO11691_REPRODUCIBILITY = ((1250.0, 2.0), (10000.0, 3.0))

Constant (float).

ISO7235_ABSOLUTE_ZERO_OFFSET = 273.0

Constant (float).

ISO7235_COVERAGE_FACTOR = 2.0

Constant (float).

ISO7235_GAS_CONSTANT = 287.0

Constant (mapping).

ISO7235_REPRODUCIBILITY = {'insertion_loss': ((100.0, 1.5), (500.0, 1.0), (1250.0, 2.0), (10000.0, 3.0)), 'transmission_loss': ((100.0, 3.0), (500.0, 3.0), (1250.0, 3.0), (10000.0, 3.0)), 'intensity': ((100.0, 3.0), (500.0, 1.5), (1250.0, 1.0), (5000.0, 1.0))}

Constant (tuple).

ISO7235_SPREAD_LIMITS = ((50.0, 10.0), (63.0, 10.0), (80.0, 8.0), (100.0, 8.0), (125.0, 7.0), (160.0, 6.0))
measured_transmission_loss(
insertion_loss: ArrayLike,
open_end_loss: ArrayLike,
) -> NDArray[np.float64]

ISO 7235 Equation (6): the transmission loss of an air-terminal unit.

An air-terminal unit is measured in a reverberation room, so what the two series give is an insertion loss against the substitution duct. The unit’s own transmission loss is that plus what the open end of the duct was keeping in anyway, which is why Equation (6) needs the theoretical of Annex B rather than a second measurement.

Well above the frequency at which the duct mouth is a wavelength across, goes to zero and the two quantities meet.

Parameters

NameDescription
insertion_loss, in dB, from substitution_insertion_loss.
open_end_loss, in dB, from open_end_transmission_loss.

Returns: , in dB, one value per band.

Raises

ExceptionWhen
ValueErrorIf a value is not finite, or if the two arrays carry different numbers of bands. Both are per-band quantities, so neither stands in for a whole run.
measurement_expanded_uncertainty(
frequency: float,
*,
quantity: str = 'insertion_loss',
) -> float

ISO 7235 7.9: twice the reproducibility, for 95 % coverage.

Unless the laboratory knows better, the expanded uncertainty it records is twice the standard deviation of Table 7. That puts a measured insertion loss of 25 dB at 250 Hz within 2 dB of the truth and the same figure at 4 kHz within 6.

Parameters

NameDescription
frequencyThe one-third-octave band centre, in Hz.
quantityThe column of Table 7, as in measurement_reproducibility.

Returns: The expanded uncertainty, in dB.

Raises

ExceptionWhen
ValueErrorAs measurement_reproducibility.
measurement_reproducibility(
frequency: float,
*,
quantity: str = 'insertion_loss',
) -> float

ISO 7235 Table 7: the reproducibility standard deviation.

The three columns do not agree with one another, and that is the useful part. Insertion loss is measured best in the middle of the range, 1 dB from 125 to 500 Hz, and worst at the top, 3 dB above 1,6 kHz. The sound-intensity route runs the other way, 3 dB at the bottom and 1 dB in the top two ranges. Transmission loss is a flat 3 dB everywhere, which is the mark of an estimate rather than a measurement: 7.9 says only the insertion-loss column came from tests, on 1 m long parallel-baffle silencers, and that the other two rest on experience.

Parameters

NameDescription
frequencyThe one-third-octave band centre, in Hz.
quantity"insertion_loss", "transmission_loss" or "intensity", choosing the column.

Returns: , in dB.

Raises

ExceptionWhen
ValueErrorIf the frequency is not positive and finite, if it is above the range the column covers, or if the quantity is not one of the three the table prints.
microphone_positions_required(levels: ArrayLike, frequency: float) -> int

ISO 7235 6.2.1: three microphone positions, or five.

Parameters

NameDescription
levelsThe band levels measured at the three key positions, in dB. Exactly three are expected, because the rule is about whether three were enough.
frequencyThe one-third-octave band centre, in Hz.

Returns: 3 if the three positions agree closely enough for the band, 5 if the standard asks for two more.

Raises

ExceptionWhen
ValueErrorIf a level is not finite, if there are not three of them, or if the frequency is not positive and finite.
microphone_spread_limit(frequency: float) -> float

ISO 7235 Table 6: how far three positions may disagree.

A spatial average in a test duct is taken from at least three microphone positions equally spaced on a line across the duct. If the highest and the lowest of the three differ by more than the limit of Table 6, three positions are not enough to describe the field and five shall be used.

The limit falls with frequency, from 10 dB at 50 and 63 Hz to 6 dB from 160 Hz upwards, because a duct at low frequency has a standing-wave pattern the three points sample badly and at high frequency does not.

The argument is a one-third-octave band centre, which is where the table is defined. A frequency between two of them takes the limit of the next centre at or above it, so the step from 7 dB to 6 dB sits immediately above 125 Hz rather than anywhere in the gap the printed table leaves between 125 and its > 160 row.

Parameters

NameDescription
frequencyThe one-third-octave band centre, in Hz.

Returns: The largest tolerated difference between the three positions, in dB.

Raises

ExceptionWhen
ValueErrorIf the frequency is not positive and finite.

Constant (int).

MINIMUM_FLOW_RATES = 5

Constant (float).

MINIMUM_PRESSURE_DIFFERENCE_PA = 10.0

Constant (tuple).

MODAL_FILTER_ATTENUATION_DB = (3.0, 5.0)
modal_filter_cut_on(
*,
diameter_m: float | None = None,
larger_dimension: float | None = None,
speed_of_sound: float = 343.0,
) -> float

ISO 7235 Equations (4) and (5): where higher-order modes start.

NOTE 2 to 5.2.2.3 prints these for the duct the modal filter is connected to, because the filter’s requirement changes there: at least 3 dB of longitudinal attenuation of the fundamental mode at the low-frequency end, and at least 5 dB above this frequency, where the higher-order modes the filter exists to suppress can propagate.

The rectangular form is exact: the first mode of a rigid rectangular duct is a half wavelength across the larger dimension, so . The circular constant is rounded: the exact value is the first zero of , which puts the coefficient at 0,58607 rather than 0,59, so Equation (4) sits 0,67 % high. The exact eigenvalues are in phonometry.noise_control.circular_duct_cut_on, which also carries the mean-flow correction this equation does not have.

Parameters

NameDescription
diameter_m of a circular duct, in m. Exactly one of the two dimensions is given.
larger_dimension, the larger cross-sectional dimension of a rectangular duct, in m.
speed_of_sound, in m/s.

Returns: or , in Hz.

Raises

ExceptionWhen
ValueErrorIf neither dimension or both are given, or if a value is not positive and finite.
normal_air_density(
static_gauge_pressure_pa: float,
ambient_pressure_pa: float,
temperature_c: float,
) -> float

ISO 7235 Equations (10), (21) and (22): the density where it matters.

The ideal gas law with the standard’s own numbers. The static pressure in the duct is measured as a gauge pressure against the ambient, so the two are added to get the absolute pressure the gas law wants, and the temperature is the one in the plane the pressure was measured in.

Three equations print this: (10) for the normalised flow rate of (9), and (21) and (22) for the two series of the computational route of 6.5.2.2.3. They differ only in which measurement they are given.

Both printed constants are a little off the accurate figures. The offset 273 rather than 273,15 puts the density 0,051 % high at 20 °C, and rather than 287,05 adds 0,017 % to that, for 0,069 % in all. It does not cancel out of the pressure loss coefficient: the same density is in the dynamic pressure of both series, so the whole coefficient is scaled by that one factor rather than shifted, which leaves it 0,069 % low. That is far under the uncertainty of a pressure-loss test, and using the printed constants is what reproduces a result computed to the standard, which is why ISO7235_ABSOLUTE_ZERO_OFFSET and ISO7235_GAS_CONSTANT carry them as printed.

Parameters

NameDescription
static_gauge_pressure_pa, the duct static pressure relative to the ambient, in Pa.
ambient_pressure_pa, the absolute ambient pressure, in Pa.
temperature_c, in °C.

Returns: , in kg/m³.

Raises

ExceptionWhen
ValueErrorIf the ambient pressure is not positive and finite, if the gauge pressure is not finite, if the absolute pressure they make is not positive, or if the temperature is at or below the printed absolute zero.
octave_insertion_loss(insertion_loss: ArrayLike) -> NDArray[np.float64]

ISO 11691 Equation (2): three one-third octaves into their octave.

The average is taken on what the silencer lets through, not on the decibels, and the two are not the same thing. A silencer that gives 30, 30 and 5 dB across an octave gives 9,8 dB over the octave, not 21,7: the band that leaks decides the answer, because it is the one carrying nearly all of the transmitted energy. That is the whole reason the standard writes the equation out rather than letting a reader average the numbers.

ISO 11691 states the assumption it rests on: the sound pressure levels of the three one-third octaves are taken to be equal in the series run with the substitution duct, so their energies can be weighted equally here.

Parameters

NameDescription
insertion_lossOne-third-octave insertion losses in dB, in ascending frequency order, a multiple of three of them. Each consecutive group of three is one octave.

Returns: , in dB, a third as many values.

Raises

ExceptionWhen
ValueErrorIf a value is not finite, if the array is empty, or if it does not hold a multiple of three bands.
open_end_reflection_coefficient(
frequency: ArrayLike,
area: float,
*,
solid_angle_sr: float = 6.283185307179586,
speed_of_sound: float = 343.0,
) -> NDArray[np.float64]

ISO 7235 Equation (B.4): the pressure reflection coefficient there.

The same physics as Equation (B.3) said the other way round, and the two close exactly: what is not transmitted is reflected, so for every frequency, area and solid angle. That identity is the conformance anchor for both, because neither standard prints a worked example of either.

Clause 5.2.4 puts this quantity to work as a requirement rather than as a result: a test duct with an anechoic termination qualifies only if its reflection coefficient is no greater than 0,3.

Parameters

NameDescription
frequencyBand centre frequencies , in Hz.
area, the cross-sectional area of the duct, in m².
solid_angle_sr, in sr.
speed_of_sound, in m/s.

Returns: , dimensionless, one value per frequency.

Raises

ExceptionWhen
ValueErrorIf a value is not positive and finite.
open_end_transmission_loss(
frequency: ArrayLike,
area: float,
*,
solid_angle_sr: float = 6.283185307179586,
speed_of_sound: float = 343.0,
) -> NDArray[np.float64]

ISO 7235 Equation (B.3): what the open end of a duct keeps in.

A duct radiating into a room does not hand the room everything that reaches its mouth. Well below the frequency at which the mouth is a wavelength across it is a poor radiator, and most of the energy turns round and goes back up the duct; well above it the mouth is transparent and the loss goes to zero. The group is the mouth measured in wavelengths, and the solid angle says how much room there is to radiate into. It works the way round that surprises people: is in the numerator, so a duct ending in the middle of a room () keeps more sound in than one flush with a wall (). A baffle is what makes an opening a good radiator, because it stops the pressure relieving round the rim, and an unbaffled mouth of the same size sends more of the sound back up the duct.

ISO 5135 prints the identical formula as its own Equation (2), where it is called the end reflection loss of the open duct and is added to the sound power radiated into the room. The two names are one quantity.

The library also carries a different closed form for the same physics, phonometry.noise_control.end_reflection_loss_closed_form, which is Reynolds’ as given by Long and raises the same argument to 1,88 rather than to 2. For a circular duct in free space the two are against , so they part company where the argument is far from 1, which is at the ends of the range rather than in the middle.

Parameters

NameDescription
frequencyBand centre frequencies , in Hz.
area, the cross-sectional area of the duct, in m².
solid_angle_sr, the solid angle of radiation at the duct end, in sr. The five configurations of Table B.1 are in RADIATION_SOLID_ANGLES; the default is a duct flush with one surface.
speed_of_sound, in m/s.

Returns: , in dB, one value per frequency.

Raises

ExceptionWhen
ValueErrorIf a value is not positive and finite.
OperatingLine(
slope: float,
intercept: float,
maximum_deviation: float,
smallest_duty: float,
largest_duty: float,
duty: NDArray[np.float64],
levels: NDArray[np.float64],
)

ISO 5135 5.5.2: a level fitted against the logarithm of a duty.

An air-terminal device is not tested at the one operating point a designer will use it at. It is tested at several, and the standard fits a straight line through the levels against or by least squares. Between the points that is interpolation; outside them 5.5.2 allows the line to be extended down to half the smallest duty measured and up to twice the largest, and no further.

Two things make the fit reportable. The maximum deviation between the measured points and the line has to be within EXTRAPOLATION_MAX_DEVIATION_DB; past that the levels are not a straight line in this variable and the extrapolation means nothing. And clause 8 k) requires the report to say which of the values it gives are extrapolated rather than measured directly.

Attributes

NameDescription
slopedB per decade of the duty.
interceptThe level, in dB, at a duty of 1 in whatever unit the duty was given in.
maximum_deviationThe largest distance, in dB, between a measured point and the line.
smallest_dutyThe lowest duty measured.
largest_dutyThe highest duty measured.
dutyThe duties the fit was made from, as given.
levelsThe levels, in dB, as given.
OperatingLine.level_at(duty: float) -> float

The fitted level at one duty, in dB.

Parameters

NameDescription
dutyThe volume flow rate or total pressure loss to read the line at, in the unit the fit was made in.

Returns: The level, in dB, rounded to nothing: clause 8 k) asks for half a decibel in the report and REPORTING_RESOLUTION_DB carries that, but rounding here would compound through a chain.

Raises

ExceptionWhen
ValueErrorIf the duty is not positive and finite.

Warns

WarningWhen
SilencerMeasurementWarningIf the duty is outside the range 5.5.2 allows the line to be extended over.
OperatingLine.plot(
ax: Axes | None = None,
*,
language: str = 'en',
**kwargs: Any,
) -> Axes

Plot the measured points and the line fitted through them.

Requires matplotlib (pip install phonometry[plot]).

property

The duties 5.5.2 lets the line be read at, half to twice.

pressure_loss_coefficient(
total_loss: float,
inlet_dynamic_pressure_pa: float,
) -> float

ISO 7235 Equations (14) and (17): the loss in velocity heads.

A pressure loss on its own says nothing without the flow it was measured at, because it grows as the square of the velocity. Dividing by the velocity head of Equation (13) takes that out and leaves a number that belongs to the object: how many velocity heads it costs to push air through it. Equation (17) is the same division with the mid-range point of the fundamental method, .

Parameters

NameDescription
total_loss or , in Pa.
inlet_dynamic_pressure_pa or , in Pa.

Returns: , dimensionless.

Raises

ExceptionWhen
ValueErrorIf the loss is not finite, or if the dynamic pressure is not positive and finite.

Warns

WarningWhen
SilencerMeasurementWarningIf the loss does not exceed the 10 Pa 6.5.2.1 asks even the lowest airflow rate of a series to produce. The clause reads greater than, so a point sitting exactly on 10 Pa is one the series may not be built from and warns like any below it.

Constant (mapping).

RADIATION_SOLID_ANGLES = {'A': 6.283185307179586, 'B': 3.141592653589793, 'C': 12.566370614359172, 'D': 6.283185307179586, 'E': 12.566370614359172}

Constant (float).

RECTANGULAR_CUT_ON_COEFFICIENT = 0.5

Constant (float).

REPORTING_RESOLUTION_DB = 0.5

A substitution measurement is outside the range its method covers.

Raised when a test arrangement falls outside a limit the standard writes down but does not make an error: an area ratio outside the 0,6 to 1,7 of ISO 11691 4.5, or a band outside the 50 Hz to 10 kHz both standards measure over. The arithmetic still runs, because a laboratory may report such a value as long as it says so.

substitution_area_ratio(duct_area: float, element_area: float) -> float

ISO 11691 4.5: the test duct against the silencer it feeds.

The survey method wants the test ducts to be close in cross section to what they connect to. Outside the range of 0,6 to 1,7 the ducts are no longer standing in for the installation the silencer will see, and the reflections at the two joints stop being negligible; inside it, transition elements may be fitted.

Parameters

NameDescription
duct_areaThe cross-sectional area of the test duct, in m².
element_areaThe cross-sectional area of the silencer or of the substitution duct, in m².

Returns: The ratio of the two areas, dimensionless.

Raises

ExceptionWhen
ValueErrorIf an area is not positive and finite.

Warns

WarningWhen
SilencerMeasurementWarningIf the ratio is outside 0,6 to 1,7.
substitution_insertion_loss(
substitution_level: ArrayLike,
object_level: ArrayLike,
*,
reverberation_times: tuple[ArrayLike, ArrayLike] | None = None,
) -> NDArray[np.float64]

The insertion loss of the two test series, band by band.

Both printings are the same subtraction: the level measured without the test object minus the level measured with it. ISO 7235 numbers the series so that carries the test object and the substitution duct (Equation (1)); ISO 11691 numbers them the other way, for the substitution duct and for the silencer (Equation (1) of that standard). The argument names here follow what was in the duct rather than either numbering, so neither convention can be entered backwards without the sign of the answer saying so.

The optional reverberation times are ISO 7235 6.3: if the receiving room’s absorption moved between the two series, the level difference is not yet the insertion loss and puts it right, with the time measured with the test object installed. When the test object sits outside the room, 6.3 allows , and then the term is zero and the pair can be left out.

Parameters

NameDescription
substitution_levelThe band levels of the series run with the substitution duct in place of the test object, in dB.
object_levelThe band levels of the series run with the test object installed, in dB.
reverberation_timesOptionally (T_1, T_2) in s, the reverberation times of the substitution series and of the test-object series, for the correction of 6.3. One value stands for every band.

Returns: , in dB, one value per band.

Raises

ExceptionWhen
ValueErrorIf a level is not finite, if the arguments do not all carry the same number of bands, or if a reverberation time is not positive and finite.

Constant (tuple).

SURVEY_AREA_RATIO_RANGE = (0.6, 1.7)

Constant (tuple).

SURVEY_BAND_RANGE_HZ = (50.0, 10000.0)

Constant (tuple).

SURVEY_DIAMETER_RANGE_M = (0.08, 2.0)

Constant (float).

SURVEY_MAX_VELOCITY_M_S = 15.0
survey_reproducibility(frequency: float) -> float

ISO 11691 Table 1: the survey method’s own reproducibility.

Two decibels up to the 1,25 kHz one-third octave and three above it. ISO 11691 makes no claim of its own beyond that: it says outright that exact information on the precision cannot be given, that interlaboratory tests would be needed for a real sigma_R, and that this estimate is what makes it a survey standard.

Parameters

NameDescription
frequencyThe one-third-octave band centre, in Hz.

Returns: , in dB.

Raises

ExceptionWhen
ValueErrorIf the frequency is not positive and finite, or above the 10 kHz the table stops at.
total_pressure(
static_pressure_pa: float,
volume_flow: float,
area: float,
density: float,
) -> float

ISO 7235 Equation (11): static plus dynamic, in one plane.

Parameters

NameDescription
static_pressure_pa, in Pa, in the same reference as the answer is wanted in.
volume_flow, in m³/s.
area, in m².
density, in kg/m³.

Returns: , in Pa.

Raises

ExceptionWhen
ValueErrorIf the static pressure is not finite, or if another value is not positive and finite.
total_pressure_loss(
static_pressure_loss_pa: float,
inlet_dynamic_pressure_pa: float,
inlet_area: float,
outlet_area: float,
) -> float

ISO 7235 Equation (12): the total pressure loss across the object.

Measuring static pressures on both sides is not enough when the two sides are different sizes: an object that widens the duct converts velocity head back into static pressure, and a static-pressure difference alone would credit it with a recovery that is only bookkeeping. The bracket is that correction, and the NOTE to Equation (14) says what usually happens to it: as a rule , and it vanishes.

Parameters

NameDescription
static_pressure_loss_pa, in Pa.
inlet_dynamic_pressure_pa from dynamic_pressure at the inlet, in Pa.
inlet_area, the inlet test duct, in m².
outlet_area, the outlet test duct, in m².

Returns: , in Pa.

Raises

ExceptionWhen
ValueErrorIf the static loss is not finite, or if another value is not positive and finite.

Constant (float).

UPSTREAM_STRAIGHT_DIAMETERS = 5.0
upstream_straight_length(area: float) -> float

ISO 7235 6.5.2.2.1: how much straight duct the flow needs first.

The upstream test duct is straight for at least or 2 m, whichever is greater, where is the equivalent diameter. Below about 0,126 m² the 2 m floor is what binds; above it the five diameters are.

The length is there so the velocity profile has settled by the time it reaches the test object: 6.5.2.2.1 wants it uniform to ±10 % of the mean over the cross section, excluding the 15 mm nearest the walls, surveyed at ten points along each of two perpendicular axes about upstream.

Parameters

NameDescription
area, the cross-sectional area of the duct, in m².

Returns: The straight length required, in m.

Raises

ExceptionWhen
ValueErrorIf the area is not positive and finite.

Constant (float).

UPSTREAM_STRAIGHT_MIN_M = 2.0

Constant (float).

VELOCITY_PROFILE_TOLERANCE_PERCENT = 10.0
volume_flow_rate(mass_flow: float, density: float) -> float

ISO 7235 Equations (8) and (9): mass flow into volume flow.

The two printings are one division and differ only in which density goes in. Equation (8) uses the density upstream of the test object. Equation (9) uses the normalised density of Equation (10), and 6.5.2.1 says when: if the flow meter and the test object are far enough apart in temperature or static pressure that their density ratio leaves 0,98 to 1,02, the meter is no longer measuring the flow the test object sees. DENSITY_RATIO_RANGE carries that window.

Parameters

NameDescription
mass_flow, in kg/s.
density or , in kg/m³.

Returns: , in m³/s.

Raises

ExceptionWhen
ValueErrorIf a value is not positive and finite.