Acoular 25.04 documentation

MovingPointSourceDipole

«  MovingPointSource   ::   sources   ::   MovingLineSource  »

MovingPointSourceDipole

class acoular.sources.MovingPointSourceDipole

Bases: PointSourceDipole, MovingPointSource

Define a moving point source with dipole characteristics.

This class extends the functionalities of PointSourceDipole and MovingPointSource to simulate a dipole source that moves along a defined trajectory. It incorporates both rotational and translational dynamics for the dipole lobes, allowing simulation of complex directional sound sources.

Key Features:
  • Combines dipole characteristics with source motion.

  • Supports rotation of the dipole directivity via the rvec attribute.

  • Calculates emission times using Newton-Raphson iteration.

See also

acoular.sources.PointSourceDipole

For stationary dipole sources.

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 dipole directivity. If set to (0, 0, 0), the dipole is only translated along the trajectory without rotation. Default is (0, 0, 0).

get_emission_time(t, direction)

Calculate the emission time and related properties for a moving source.

Parameters:
tnumpy.ndarray

The current receiving time at the microphones.

directionfloat or numpy.ndarray

Direction vector for the source’s dipole directivity.

Returns:
tuple

A tuple containing:

Warning

Ensure that the maximum iteration count (100) is sufficient for convergence in all scenarios, especially for high Mach numbers or long trajectories.

Notes

The emission times are computed iteratively using the Newton-Raphson method. The iteration terminates when the time discrepancy (eps) is below a threshold (epslim) or after 100 iterations.

get_moving_direction(direction, time=0)

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

This method computes the updated direction vector for the dipole 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 dipole, specified as a 3-element array representing the orientation of the dipole lobes.

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 dipole 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 dipole direction based on the trajectory’s motion and the reference vector.

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

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.

Notes

Radial Mach number adjustments are applied if conv_amp is enabled.

«  MovingPointSource   ::   sources   ::   MovingLineSource  »