Acoular 25.04 documentation

MovingLineSource

«  MovingPointSourceDipole   ::   sources   ::   UncorrelatedNoiseSource  »

MovingLineSource

class acoular.sources.MovingLineSource

Bases: LineSource, MovingPointSource

A moving line source with an arbitrary signal.

The MovingLineSource class models a line source composed of multiple monopoles that move along a trajectory. It supports coherent and incoherent sources and considers Doppler effects due to motion.

Key Features:
  • Specify the trajectory and rotation of the line source.

  • Compute emission times considering motion and source direction.

  • Generate block-wise microphone output with moving source effects.

See also

acoular.sources.LineSource

For line sources consisting of coherent or incoherent monopoles.

acoular.sources.MovingPointSource

For moving point sources without dipole characteristics.

digest = Property(

A unique identifier for the current state of the source, based on its properties. (read-only)

rvec = CArray(dtype=float, shape=(3,), value=array((0, 0, 0)), desc='reference vector')

A reference vector, perpendicular to the x and y-axis of moving source, defining the axis of rotation for the line source directivity. If set to (0, 0, 0), the line source is only translated along the trajectory without rotation. Default is (0, 0, 0).

get_moving_direction(direction, time=0)

Calculate the moving direction of the line source along its trajectory.

This method computes the updated direction vector for the line source, considering both translation along the trajectory and rotation defined by the reference vector. If the reference vector is (0, 0, 0), only translation is applied. Otherwise, the method incorporates rotation into the calculation.

Parameters:
directionnumpy.ndarray

The initial direction vector of the line source, specified as a 3-element array representing the orientation of the line.

timefloat, optional

The time at which the trajectory position and velocity are evaluated. Defaults to 0.

Returns:
numpy.ndarray

The updated direction vector of the line source after translation and, if applicable, rotation. The output is a 3-element array.

Notes

  • The method computes the translation direction vector based on the trajectory’s velocity at the specified time.

  • If the reference vector is non-zero, the method constructs a rotation matrix to compute the new line source direction based on the trajectory’s motion and the reference vector.

  • The rotation matrix ensures that the new orientation adheres to the right-hand rule and remains orthogonal.

get_emission_time(t, direction)

Calculate the emission time for a moving line source based on its trajectory.

This method computes the time at which sound waves are emitted from the line source at a specific point along its trajectory. It also determines the distances from the source to each microphone and calculates the radial Mach number, which accounts for the Doppler effect due to the motion of the source.

Parameters:
tfloat

The current receiving time at the microphones, specified in seconds.

directionnumpy.ndarray

The current direction vector of the line source, specified as a 3-element array representing the orientation of the line.

Returns:
tenumpy.ndarray

The computed emission times for each microphone, specified as an array of floats.

rmnumpy.ndarray

The distances from the line source to each microphone, represented as an array of absolute distances.

Mrnumpy.ndarray

The radial Mach number, which accounts for the Doppler effect, calculated for each microphone.

xsnumpy.ndarray

The position of the line source at the computed emission time, returned as a 3-element array.

Notes

  • This method performs Newton-Raphson iteration to find the emission time where the sound wave from the source reaches the microphones.

  • The distance between the line source and microphones is computed using Euclidean geometry.

  • The radial Mach number (Mr) is calculated using the velocity of the source and the speed of sound in the medium (c).

  • The method iterates until the difference between the computed emission time and the current time is sufficiently small (within a defined threshold).

result(num=128)

Generate the output signal at microphones in blocks.

Parameters:
numint, optional

Number of samples per block to yield. Default is 128.

Yields:
numpy.ndarray

A 2D array of shape (num, num_channels) containing the signal detected at the microphones. The last block may have fewer samples if num_samples is not a multiple of num.

«  MovingPointSourceDipole   ::   sources   ::   UncorrelatedNoiseSource  »