|
[Sponsors] |
Power spectrum of LES: understanding of the result |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
January 27, 2017, 10:52 |
Power spectrum of LES: understanding of the result
|
#1 |
Senior Member
Agustín Villa
Join Date: Apr 2013
Location: Alcorcón
Posts: 314
Rep Power: 15 |
Good afternoon,
I know that it is a very common doubt, it has been spoken several times... but I couldn't get a good idea about what should I expect from a power spectra density result. The procedure to obtain my spectrum has been: - At a given position, I have obtained the velocity value each time step dt, so my sampling frequency is Fs=1/dt - I have done the same with several points in the spanwise direction, I suppose that the flow is isotropic in that direction - This information, I give it to a PSD Welch algortihm, who provides me a frequency range, and the PSD for each frequency value. - I apply an average in the spanwise direction to smooth the PSD When I plot it, I obtain something like the attached figure. As far as I know, the PSD it usually used to estimate if the mesh, the numerical setup of the LES... is good enough, but I don't know how to understand this. If somebody can help me, I would be very gratefull. Many thanks in advance, Agustin |
|
January 27, 2017, 12:02 |
|
#2 |
Senior Member
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,855
Rep Power: 73 |
First of all, I suggest to do a check on your spectrum calculation to see if it works correctly. You can build your signal by sampling the sin(kx) function in [0:2pi] so that once you fix a value for k you have only a peack in your spectrum.
Second, the spectrum you plot can not be discussed if you do not give details of your flow problem and mesh resolution. The shape is very strange. |
|
January 27, 2017, 13:09 |
|
#3 |
Senior Member
|
I agree with Professor Denaron comment. This spectrum does not look like a turbulent kinetic energy spectrum. I would start with a an isotrooic flow field; for example a channel flow. You can choose the center line (far from the walls). You can use the DNS data set from the jhon Hopkins turbulence data base and test your spectrum (code) with the one they provide.
As far as understanding; profesor Davison has suggested in several papers that the energy spectrum computed from the two point correlation is the right approach to validate your les computation. This is also in line with Pope's textbook. I am looking forward to more contributions from other members and professor Denaro. |
|
January 27, 2017, 13:23 |
|
#4 |
Senior Member
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,855
Rep Power: 73 |
Yes. Correlations and spectra are mutually related by a mathematical transformation. This topic can be read in the book of Pope. A breif summary is here https://www.io-warnemuende.de/tl_fil...Chap4_WS08.pdf
However, understanding if a resulting spectra is mathematically well computed does not imply that it is physically meaningful. For this reason I suggest to split the study first in a numerical assesement of the procedure and then in an application on a well controlled flow problem. |
|
January 30, 2017, 04:46 |
|
#5 |
Senior Member
Agustín Villa
Join Date: Apr 2013
Location: Alcorcón
Posts: 314
Rep Power: 15 |
Hello, sorry for not answering during the weekend.
As Filippo told me, I have tried to use the PSD Welch with different sinusoidal signals, and I have checked that I obtain a peak of frequency in the specified one. I is, the code of the algorithm is ok. Now I have to see if my input is ok or not. The mistake in my spectrum may be here. I have my velocity signal, that I can decompose in a mean and fluctuating terms. With the fluctuating ones, I can get the turbulent kinetic energy as q=1/2 * (u'^2 + v'^2 + w'^2). So, I get the Fourier transform's for u'u', v'v' and w'w', and I get the FT of the turbulent kinetic energy with the previous expression. Is is like this? One question that comes to my mind is if we can get the expression of q along the time and get its FFT. Would we obtain the same results? |
|
January 30, 2017, 05:05 |
|
#6 |
Senior Member
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,855
Rep Power: 73 |
Using the sine function you get exactly 1 peak and the other coefficients are zero at machine accuracy?? How about the value of the peak?
why do you perform the FFT of the kinetic energy?? How do you perform the periodic windowing of the time-signal?? I agree with Julio, I suggest to do a controlled case using the channel flow problem and performing the spectral analysis in streamwise and spanwise direction. Only once you can superimpose the spectra with the existing database you can be sure. |
|
January 30, 2017, 05:20 |
|
#7 |
Senior Member
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,855
Rep Power: 73 |
Just a final consideration, if you want to characterize a LES spectrum, you must analyze the spatial energy spectra to see the correspondance with the LES filter. The time step characterizes a different Nyquist cut-off that, usually, lies withint the Kolomogorov time-scale.
|
|
January 30, 2017, 05:31 |
|
#8 | |
Senior Member
Agustín Villa
Join Date: Apr 2013
Location: Alcorcón
Posts: 314
Rep Power: 15 |
Quote:
About the FFT on the TKE, I was just asking. I give as input the velocity in this algorithm. I am totally a newbie in all these things in LES, and I want to understand these concepts properly. |
||
January 30, 2017, 05:52 |
|
#9 |
Senior Member
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,855
Rep Power: 73 |
Your spectrum is not correct...to see better do not use the continuous line but only symbols, you will see other contribution out of the peak at 20 Hz.
You must se only one non-zero coefficients, the others being O(10^-13). So, your first task now is clear, focus on the right FFT procedure. Second, if you want to get into the LES field you must start learning the basis...for example, read the intro of book of Sagaut. You must be aware of the fact the LES has the aim of reducing the degree of freedom and that is obtained by filtering the spatial small flow scales. As a consequence, you must assess your results by looking at the spatial correlation and spectra. For this reason you have to start with well controlled flow problem. |
|
January 30, 2017, 08:54 |
|
#10 |
Senior Member
Agustín Villa
Join Date: Apr 2013
Location: Alcorcón
Posts: 314
Rep Power: 15 |
Hello again,
for sure, when I apply the FFT to the sinus signal I got what you say, however I have some discrepancies close to the peak of 20 Hz. If I apply directly the FFT to the fluctuating part of the velocity. I obtain complex results, and in order to obtain the term u'u', I multiply by the conjugate. After that, I get the turbulent kinetic energy in the frequency domain as usual, k=0.5*uu+vv+ww. At the end, what I obtain is something like the image I attach. I forgot to say that my case is a natural convection boundary layer, so, I don't know if the profile I obtain is due to that fact, or there is something bad in my procedure. Thanks for your replies! |
|
January 30, 2017, 09:44 |
|
#11 | |
Senior Member
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,855
Rep Power: 73 |
Quote:
Until you are not able to reproduce the correct sinus response in the PDS, you cannot apply your analysis to a flow problem... You must see only one spike at the correct frequency and zero (at machine accuracy) everywhere. So, check if you passed correctly the periodic window to the FFT, it seems you get frequencies aliased. Has your buoyancy-driven flow problem homogenous directions ? |
||
January 30, 2017, 09:49 |
|
#12 |
Senior Member
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,855
Rep Power: 73 |
This is a plot of the spectrum for the sin kx function at k=1
|
|
January 30, 2017, 10:24 |
|
#13 | |
Senior Member
Agustín Villa
Join Date: Apr 2013
Location: Alcorcón
Posts: 314
Rep Power: 15 |
Quote:
As you can see, I think that I am in the right way. In the FFT of sin(2*pi*t), I can see clearly the peak. That peak only contains the real part of the solution. If I plot the magnitude of the complex values, I get the other one. There are several orders of magnitude of difference. Could I consider that it is ok? |
||
January 30, 2017, 10:33 |
|
#14 |
Senior Member
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,855
Rep Power: 73 |
No, when you plot the magnitude, that is the modulus of the Fourier coefficient, you must get 0.25. The other coefficients are less than O(10^-14).
Conversely your second plot has a wrong magnitude and other coefficients are aliased. |
|
January 30, 2017, 11:13 |
|
#15 |
Senior Member
Agustín Villa
Join Date: Apr 2013
Location: Alcorcón
Posts: 314
Rep Power: 15 |
Mmm... I am checking the values I get, and it seems that in that modulus, I should divide at a certain point by my number of samples, is it? For the moment, I was not using a window, but using the Hann one, I get really close of what you mean, only the closest points have a non negligible value.
|
|
January 30, 2017, 11:51 |
|
#16 |
Senior Member
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,855
Rep Power: 73 |
Check the correct number of nodes you pass to the FFT and the correct value of the period... I think that is your problem
|
|
January 30, 2017, 12:55 |
|
#17 |
Senior Member
Agustín Villa
Join Date: Apr 2013
Location: Alcorcón
Posts: 314
Rep Power: 15 |
Hello again,
I have checked my code, and I obtain a peak of 0.5. I think I am missing something... What I do is Code:
N=8000 dt=1e_3 Fs=1000 time=linspace(0,8,8000) signal=sin(2*pi*time) fftSignal = fft(signal, n=N)/N % N is the number of samples, and I normalize fftSignal = fftsignal(1:N/2) freq=Fs/2*linspace(0,1,N/2) plot(freq,abs(fftSignal)) EDIT: well, the missing factor I think is the power of 2, otherwhise I am plotting a module, not the square of my signal. I should use fftSignal*conj(fftSignal) |
|
January 30, 2017, 13:05 |
|
#18 |
Senior Member
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,855
Rep Power: 73 |
yes, you can compare with the portion of my Matlab script I posted here
Energy Spectrum for a 3D turbulent Flow |
|
January 31, 2017, 04:34 |
|
#19 | |
Senior Member
Agustín Villa
Join Date: Apr 2013
Location: Alcorcón
Posts: 314
Rep Power: 15 |
Quote:
I am taking a look into your code, and this part: Code:
for q = 1:np sum_u = 0; for k=1:l-1 sum_u = sum_u + 0.5*(cu(q,k) + cu(q,k+1))*dz; end ek1_uu(q) = sum_u/lz; end At the end, you get ek1_uu dividing since you are averaging in space with dz. |
||
January 31, 2017, 05:04 |
|
#20 |
Senior Member
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,855
Rep Power: 73 |
The cycle is over "l", an index for the spanwise direction in a channel flow problem. This way I perform a statistical averaging of the one-dimensional spectra along the stream-wise direction at several position.
Supplementary averaging is useful to get statistically meaningful results. For a time analysis, you should consider the same approach, using several periodical time-windows, performing spectra on each one and then averaging. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
LES Filtering: how are the small and large scales equations solved? | atmcfd | Main CFD Forum | 38 | March 14, 2016 15:52 |
Amplitude spectrum of temperature fluctuations | selvam2487 | CFX | 0 | March 16, 2014 14:59 |
Beginning to work in LES - Suggestions needed | atmcfd | Main CFD Forum | 5 | July 20, 2012 23:16 |
Method to determine spectrum of turbulence? | Walid | Main CFD Forum | 2 | December 2, 2005 09:29 |
Power spectrum. | Jake. | Main CFD Forum | 1 | October 9, 2004 16:18 |