# Energy Spectrum

 Register Blogs Members List Search Today's Posts Mark Forums Read

 August 11, 2012, 17:11 Energy Spectrum #1 Member   Mohammad Saeedi Join Date: Apr 2011 Location: Canada Posts: 83 Rep Power: 8 Hi All, I wanted to make sure about the methodology to calculate the energy spectrum: According to Pope's book, we should first calculate the autocovariance of the signal and then take the Fourier transform of that. What I do is first calculate the autocovariance of u V.S. t signal( from a DNS) in MATLAB. when I want to take the FFT of that, there are seceral examples in its help with some subtle differences. Each gives a different answer (specially in the frequency range). Thay are all some how (not perfectly) parallel to -5/3 line. the last segment of the curve which should be vertically going down (pure dissipation) is also not visible. I am sure about my signal (accuaracy and enough time of probing) but doubt about my methodology. I'd appreciate if you give me your useful comment. Thank you

August 12, 2012, 04:00
#2
Senior Member

Filippo Maria Denaro
Join Date: Jul 2010
Posts: 3,686
Rep Power: 41
Quote:
 Originally Posted by saeedi Hi All, I wanted to make sure about the methodology to calculate the energy spectrum: According to Pope's book, we should first calculate the autocovariance of the signal and then take the Fourier transform of that. What I do is first calculate the autocovariance of u V.S. t signal( from a DNS) in MATLAB. when I want to take the FFT of that, there are seceral examples in its help with some subtle differences. Each gives a different answer (specially in the frequency range). Thay are all some how (not perfectly) parallel to -5/3 line. the last segment of the curve which should be vertically going down (pure dissipation) is also not visible. I am sure about my signal (accuaracy and enough time of probing) but doubt about my methodology. I'd appreciate if you give me your useful comment. Thank you

- what kind of turbulence are you simulating?
- how did you select the number of temporal-samples?
- are you considering the right range of frequencies until the Nyquist one?
- have you tried the same FFT for the spatial spectrum?

 August 12, 2012, 04:25 #3 Member   Mohammad Saeedi Join Date: Apr 2011 Location: Canada Posts: 83 Rep Power: 8 -I am considering homogeneous turbulent channel flow -I have a signal with 50,000 samples (each time step one sample and the total time of sampling is several times of the time required for flow to sweep the entire streamwise direction) -I just know Nyquist theorem says sampling frequency should be properly higher than the signal frequency. What do you mean exactly of (considering the right range of frequencies until the Nyquist one) ? -I did not get what you mean in your last question.

 August 12, 2012, 04:52 #4 Senior Member   Filippo Maria Denaro Join Date: Jul 2010 Posts: 3,686 Rep Power: 41 first, the Nyquist frequency is the highest one you solve in your simulation, for a well-done DNS must be of the order of the Kolmogorov one. Try to do the spectrum of the stream-wise velocity along Kx and Kz at fixed half-height of the channel. You should repeat along the plane and take the average of each FFT. Remember that the k^-5/3 slope is theoretically expected for isotropic/homogeneous turbulence, in channel flow you could have such a range only far from the walls and at high Re_tau number (>200 - 300).

 August 12, 2012, 14:40 #5 Member   Mohammad Saeedi Join Date: Apr 2011 Location: Canada Posts: 83 Rep Power: 8 My Re_tau is 300 and I considering half height. You mean I need to take the fft along the spanwise direction and then take the average? what if we first do the plane averaging for different signals and then take the fft? BTW, my main question is still remained: methodology for taking fft. There are several examples in Matlab help to take the fft of signals. which one should be used for my case? should I take the fft of the signal itself or its autocovariance?

August 12, 2012, 14:49
#6
Senior Member

Filippo Maria Denaro
Join Date: Jul 2010
Posts: 3,686
Rep Power: 41
Quote:
 Originally Posted by saeedi My Re_tau is 300 and I considering half height. You mean I need to take the fft along the spanwise direction and then take the average? what if we first do the plane averaging for different signals and then take the fft? BTW, my main question is still remained: methodology for taking fft. There are several examples in Matlab help to take the fft of signals. which one should be used for my case? should I take the fft of the signal itself or its autocovariance?

if you take the FFT of a statistically averaged field that makes no sense!! Imagine the case of a RANS solution, you can not compute energy spectrum ....

I don't remember the examples in Matlab, some time ago I read of a sunspot sample. But you have only one way to do what you are looking for, you have u(x,y,z,t), v(x,y,z,t), w(x,y,z,t), so at fixed t=T and y = H/2:

- do the FFT of each velocity component along x for all the z position. The number of frequencies you have to use is fixed and extends up to the Nyquist one.
- do the average of the Fourier coefficient in the plane
- Compute the modulus of the averaged coefficients and plot along kx

- Repeat such procedure for computing the spectra along kz changing the role of x and z

Usually no temporal spectra are computed

 August 12, 2012, 16:36 #7 Member   Mohammad Saeedi Join Date: Apr 2011 Location: Canada Posts: 83 Rep Power: 8 Do you mean spectrum at a fixed time (one snapshot)? You say usually no temporal spectrum is computed? I am confused now. Because in turbulent flows of Pope, chapter 3 (equation 3-134 and round that) he explains how to calculate the spectrum from a temporal signal. That's where he talks about calculation of autocovariance and then taking the Fourier transform?

August 12, 2012, 16:42
#8
Senior Member

Filippo Maria Denaro
Join Date: Jul 2010
Posts: 3,686
Rep Power: 41
Quote:
 Originally Posted by saeedi Do you mean spectrum at a fixed time (one snapshot)? You say usually no temporal spectrum is computed? I am confused now. Because in turbulent flows of Pope, chapter 3 (equation 3-134 and round that) he explains how to calculate the spectrum from a temporal signal. That's where he talks about calculation of autocovariance and then taking the Fourier transform?
Note that for channel flows a well-known database of DNS exists, it contains profiles, RMS, (spatial) spectra.
The spectra are computed at several times and then averaged ...

 April 21, 2014, 05:46 #9 Senior Member   Huang Xianbei Join Date: Sep 2013 Location: Yangzhou,China Posts: 285 Rep Power: 7 Hi,saeedi: Have you figure out this problem now? I'm struggling in the problem can you give me some advice?

 September 24, 2015, 17:28 #10 Senior Member   Julio Mendez Join Date: Apr 2009 Location: Greensboro, U.S.A Posts: 264 Rep Power: 11 Dear Mr. Denaro; I found this old post which is very useful. However I have a question in regards the Energy Spectrum. You mentioned that the FFT is done for each component of the velocity along x at every 'z'. Then the average of the coefficient is taken. Both what I have read is that the PSD is the FFT from the Correlation Velocity tensor. Is there something that I am not properly understanding? Thanks!

 September 27, 2015, 11:45 #11 Senior Member   Lucky Tran Join Date: Apr 2011 Location: Orlando, FL USA Posts: 1,944 Rep Power: 26 The spectral density and autocorrelation form a Fourier transform pair, this is the Wiener–Khinchin theorem. This leads to several equivalent ways to compute either. However, a brute-force evaluation of the spatial autocorrelation (or a full Fourier transform) is computationally inefficient and almost always it's faster to compute these via a "fast" fourier transform technique. i.e. it's faster to do a fft and ifft than to compute the autocorrelation directly.

 Thread Tools Display Modes Linear Mode

 Posting Rules You may not post new threads You may not post replies You may not post attachments You may not edit your posts BB code is On Smilies are On [IMG] code is On HTML code is OffTrackbacks are On Pingbacks are On Refbacks are On Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post cfd.newbie Main CFD Forum 6 September 24, 2015 16:13 cfd.newbie Siemens 1 June 19, 2008 23:48 cfd.newbie FLUENT 0 June 18, 2008 18:34 Fabian Main CFD Forum 4 October 18, 2005 02:04 Emad Khalifa Main CFD Forum 3 June 30, 2003 16:03

All times are GMT -4. The time now is 08:52.