Fourier transform of dynamic mode coefficients for impinging jet along a line from nozzle exit to plate at a distance 0.6 times jet diameter

1 vue (au cours des 30 derniers jours)
Hi everyone. I want to calculate the Fourier transform of dynamic mode coefficients for impinging jet along a line from nozzle exit to plate at a distance 0.6d. Then I want to plot the normalized wavenumber(K) spectra (Amplitude vs Kd). I have shared the code here.
Phib=reshape(Phi(:,2),96,1280);
for i=29
for j=945:-1:618
Phibb=Phib(i,945:-1:618);
end
end
Phibb=Phibb-mean(Phibb);
Phibn=Phibb./max(Phibb);
figure(88);
xl=0:4/327:4;
plot(xl,Phibn);
Px=Phibb./max(Phibb);
ff=fft(Px);
ffk=fftshift(ff);
ffn=sqrt((real(ffk).^2)+(imag(ffk).^2));
% Compute the corresponding frequencies
Ln = length(Px);
fre = linspace(-Ln/2, Ln/2, Ln);
kk=2*pi.*fre;
kkn=kk*0.01; %nondimensionalizing wrt jet dia
% xlim=3.5:-3.5/18135:0;
% subplot(r,1,i);
figure(900)
plot(kkn,ffn);
xlabel('kD')
ylabel('|Amplitude|')
I am not getting proper results. Is there any mistake I am doing in the plot? Please check my code.

Réponses (1)

Paul
Paul le 5 Août 2023
Hi DEBI,
It will be easier for people to help if yor provide all of the information needed to run your code. You should save the variable Phi in a .mat file and then add it to your question using the paperclip icon.
Also, it would be helpful if you show, or at least explain, why the result is not what you expect and what the expected result is.
Also, just from looking at the code, the calculation for fre is incorrect. It should be
fre = linspace(-Ln/2, Ln/2-1, Ln); % if Ln is even
fre = linspace(-(Ln-1)/2,(Ln-1)/2,Ln) % if Ln is odd
But the next line is:
kk=2*pi.*fre;
which kind of suggests that fre is supposed to be in units of Hz, either cycles/sample or cycles/sec. But fre is just a vector of integers, and probably needs to be scaled by 1/Ln or some other factor to get the correct units.
  7 commentaires
DEBI SARANGI
DEBI SARANGI le 10 Août 2023
Okay sir. Thank you for the response. I have attached the .mat file of phib. Please check the data and my code shared above.
DEBI SARANGI
DEBI SARANGI le 16 Août 2023
The pixel value corresponds to the distance from nozzle exit to plate surface which is 0 to 4 cm. And the pixel size 29 corresponds to 0.6 times jet dia where complete pixel value for the nozzle dia is from 0 to 96. The jet dia is 1 cm. I want to plot the spatial frequency vs amplitude plot. The data related to this I have shared above. Please check my code.
Thank you.

Connectez-vous pour commenter.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by