Assigning Directivity to a Source
Acoustic sources often have a certain directivity, for example, the directivity of a loudspeaker or even the directivity of a human speaker. When setting up sources in a ray acoustics model this directivity can be specified. In order to do that you need to modify the source power expression in, for example, an Inlet feature (with tag rac.inl1) where the Ray direction vector has been set to Hemispherical.
If you have a directivity and sensitivity function f(alpha, beta, freq) with alpha the angle in xy-plane, beta the angle in xz-plane, and freq the ray frequency, then the function to modify the ray power/intensity is as follows:
Q0*f(alpha,beta,freq)*rac.inl1.Ntf/rac.racop1(f(alpha,beta,freq))
where Q0 is the base intensity, rac.inl1.Ntf is the total number of rays released, and rac.racop1(f) weighs the function f, for the normalization of the task.