%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%% Aeroacoustic source simulation for: %%% %%% D. E. S. Breakey, J. A. Fitzpatrick, and C. Meskell, %%% "Aeroacoustic source analysis using time-resolved PIV in a free jet," %%% Under review for Experiments in Fluids, 2012. %%% %%% Copyright (c) 2012, David Breakey (breakeyd@tcd.ie) %%% All rights reserved. %%% %%% Redistribution and use in source and binary forms, with or without %%% modification, are permitted provided that the following conditions are met: %%% %%% 1. Redistributions of source code must retain the above copyright notice, this %%% list of conditions and the following disclaimer. %%% 2. Redistributions in binary form must reproduce the above copyright notice, %%% this list of conditions and the following disclaimer in the documentation %%% and/or other materials provided with the distribution. %%% %%% THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND %%% ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED %%% WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE %%% DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR %%% ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES %%% (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; %%% LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND %%% ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT %%% (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS %%% SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%Experiment parameters D = 50;%mm, Jet diameter Uj = 85000;%mm/s, Jet velocity Uc = 0.7*Uj;%mm/s, Convection velocity f = 1190;%Hz, Oscillation frequency c0 = 340000;%mm/s, Speed of sound fs = 27000;%Hz, Sample rate xmic = 7*D;%mm, Mic location (x) ymic = 4*D;%mm, Mic location (y) %%%Model parameters A = 1;%unitless C = 1;%unitless B = C/10;%unitless b = 2*D;%mm c = 2*D;%mm xs1 = 0;%mm xs2 = 6*D;%mm tc = 0.001;%s %%%Simulation parameters xmax = 10*D;%mm dx = D/10;%mm tmax = 18*D/Uc;%s dt = 1/fs;%s %%%Dimension vectors x = (0:dx:xmax).'; t = (dt:dt:tmax).'; t = [-t(end:-1:1) ; 0 ; t(1:end-1)]; %symmetric t with even number of points for FFT r = sqrt((xmic-x).^2+(ymic-0).^2); %%%Expand dimensions into grid [xx,tt] = meshgrid(x,t); rr = sqrt((xmic-xx).^2+(ymic-0).^2); %%%Source model (Eq. 9) q = A*cos(2*pi*f*(tt-xx/Uc)).*exp(-abs(tt-xx/Uc)/tc); %%%Damping envelope model (Eq. 10) Df = B*exp(-(xx-xs1).^2/b^2) + C*exp(-(xx-xs2).^2/b^2); %%%Calculate far-field contributions (Eq. 11) nfft = length(t); freqFFT = [0:nfft/2-1 -nfft/2:-1]'*fs/nfft; coef = 1/4/pi./rr; qshift = ifft(fft(q,nfft,1).*exp(1j*2*pi*freqFFT*(-r'/c0)),nfft,'symmetric'); dq = coef.*qshift.*Df*dx; %%%Integrate far-field contributions (Eq. 11) p = sum(dq,2); %%%Perform correlation Rqp = ifft(conj(fft(q,nfft,1)).*repmat(fft(p,nfft,1),[1 length(x)]),nfft,'symmetric')/nfft; Rqp = [Rqp(nfft/2+1:end,:);Rqp(1:nfft/2,:)]; %move negative lags before positive Rqp = Rqp./repmat(std(q),[nfft 1])/std(p); %apply scaling %%%Plot results contourf(xx/D,(tt-rr/c0)*Uc/D,Rqp,30,'linestyle','none'); colorbar hold on plot(x/D,0*x) plot(x/D,(r(1)/c0-r/c0-x/Uc)*Uc/D) hold off xlabel('x/D') ylabel('tau*Uc/D')