UniformFlowEnvironment#

class acoular.environments.UniformFlowEnvironment

Bases: Environment

An acoustic environment with uniform flow.

This class models an acoustic environment where sound propagates in a medium with uniform flow. It extends the Environment class to account for the effects of flow on sound propagation, such as changes in travel times and distances due to advection by the flow field.

The flow is assumed to be uniform and steady, characterized by its Mach number (ma) and direction (fdv).

Notes

The effective distance is adjusted by solving a flow-dependent relationship that accounts for the cosine of the angle between the flow direction and the propagation path.

ma

The Mach number of the flow, defined as the ratio of the flow velocity to the speed of sound. Default is 0.0, which corresponds to no flow.

fdv

A unit vector specifying the direction of the flow in 3D Cartesian coordinates. Default is (1.0, 0, 0), which corresponds to flow in the x-direction.

digest

A unique identifier based on the environment properties. (read-only)

apparent_r(gpos, mpos=0.0)

Compute the apparent distances between two sets of points.

This method calculates the distance between points gpos and mpos in a 3-D space, with an additional adjustment based on a mass term and force vector. The result is affected by the angle between the direction of movement and the force vector.

Parameters:
gposnumpy.ndarray of floats

The 3-D coordinates of the first set of points, shape (3, N).

mposfloat or numpy.ndarray of floats, optional

The 3-D coordinates of the second set of points. If a scalar is provided, it is treated as the origin (0, 0, 0). If an array is given, it should have shape (3, M), where M is the number of points.

Returns:
rmnumpy.ndarray of floats

The distances between each point in gpos and mpos. The result is an array of

  • shape (N,) if mpos is a single point, or

  • shape (N, M) if mpos consists of multiple points.

Notes

The apparent distance accounts for the convection of sound by the uniform flow. The adjustment depends on the Mach number ma and the angle between the propagation path and the flow direction fdv.

c

The speed of sound in the environment. Default is 343.0, which corresponds to the approximate speed of sound at 20°C in dry air at sea level, if the unit is m/s.

roi

The region of interest (ROI) for calculations. (Not needed for most types of environment.) Default is None.