![]() ![]() (a) fft for original pressure (b) fft after remove the mean pressureįigure 2(a) shows the fft without subtracting the average value of pressure. There are corresponding explanations in the code. T = dt * freq_save = 7.7e-5 * 100 = 0.0077Ĭode: 1 %% load pressure data and plot itĥ 6 delt_t=5 % = c/u_infinity = 1/0.2 = 5, reference timeġ0 P= ġ1 time=(time_pressuer_1_7(:,1)-time_pressuer_1_7(1,1))*delt_t % real timeĢ1 22 P_mean = mean(tap_pressure) % the mean value will appear in the 0Hz of fft with a peak valueĢ3 % need to be removed from the original dataĢ4 25 fft_p = fft(tap_pressure-P_mean) % detrent the data, remove the mean valueĢ7 p1 = p2(1:L/2+1) % single side amplitudeģ2 plot(f(1:150),p1(1:150 )) % here I just plot the low frequency components, thee is nearly no high frequence componentsģ3 title( ' single-sided amplitude spectrum of y ' )ģ8 peak_freq = f(n) % find the peak frequence It can be calculated that my sampling period is: ![]() Otherwise, there will be a strong frequency component at the frequency of 0Hz after FFT, which may cause other frequency components to be submerged.įigure 1 shows the pressure data to be Fourier transformed.įirstly, Fourier transform is carried out with Matlab.įreq_save = 100% the data saving frequency is 100, that is, 100 time steps (dt) are saved once ![]() Before starting the transform, you need to subtract the DC component of the data (for my case), that is, the average value of the pressure. ![]() Matlab provides a ready-made Fourier transform tool: FFT. I use Matlab and Tecplot to carry out Fourier transform respectively, and compare the results, and they get the same results. I want to carry out Fourier transform on it to see if I can find some useful information about pressure in the frequency domain. The pressure data is extracted from DNS data. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |