MovingLineSource#
- class acoular.sources.MovingLineSource
Bases:
LineSource,MovingPointSourceA moving
line sourcewith an arbitrary signal.The
MovingLineSourceclass models aline sourcecomposed of multiple monopoles that move along atrajectory. It supportscoherent and incoherentsources and considers Doppler effects due to motion.- Key Features:
Specify the
trajectoryand rotation of theline source.Compute emission times considering motion and source
direction.Generate block-wise microphone output with moving source effects.
See also
LineSourceFor
line sourcesconsisting ofcoherent or incoherentmonopoles.MovingPointSourceFor 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=np.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 thetrajectorywithout rotation. Default is(0, 0, 0).
- 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:
- t
float The current receiving time at the microphones, specified in seconds.
- direction
numpy.ndarray The current direction vector of the line source, specified as a 3-element array representing the orientation of the line.
- t
- Returns:
- te
numpy.ndarray The computed emission times for each microphone, specified as an array of floats.
- rm
numpy.ndarray The distances from the line source to each microphone, represented as an array of absolute distances.
- Mr
numpy.ndarray The radial Mach number, which accounts for the Doppler effect, calculated for each microphone.
- xs
numpy.ndarray The position of the line source at the computed emission time, returned as a 3-element array.
- te
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:
- num
int, optional Number of samples per block to yield. Default is
128.
- num
- Yields:
numpy.ndarrayA 2D array of shape (
num,num_channels) containing the signal detected at the microphones. The last block may have fewer samples ifnum_samplesis not a multiple ofnum.