UniformFlowEnvironment#
- class acoular.environments.UniformFlowEnvironment
Bases:
EnvironmentAn acoustic environment with uniform flow.
This class models an acoustic environment where sound propagates in a medium with uniform flow. It extends the
Environmentclass 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
gposandmposin 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:
- gpos
numpy.ndarrayoffloats The 3-D coordinates of the first set of points, shape
(3, N).- mpos
floatornumpy.ndarrayoffloats, 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.
- gpos
- Returns:
- rm
numpy.ndarrayoffloats The distances between each point in
gposandmpos. The result is an array ofshape (N,) if
mposis a single point, orshape (N, M) if
mposconsists of multiple points.
- rm
Notes
The apparent distance accounts for the convection of sound by the uniform flow. The adjustment depends on the Mach number
maand the angle between the propagation path and the flow directionfdv.
- 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.