- **Main CFD Forum**
(*https://www.cfd-online.com/Forums/main/*)

- - **Energy Spectrum**
(*https://www.cfd-online.com/Forums/main/105888-energy-spectrum.html*)

Energy SpectrumHi 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 |

Quote:
- 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? |

-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. |

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). |

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? |

Quote:
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 |

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? |

Quote:
The spectra are computed at several times and then averaged ... |

Hi,saeedi:
Have you figure out this problem now? I'm struggling in the problem:( can you give me some advice? |

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! |

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. |

All times are GMT -4. The time now is 16:59. |