CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > General Forums > Main CFD Forum

Power Spectral Density - Energy Spectrum

Register Blogs Community New Posts Updated Threads Search

Like Tree8Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 4, 2019, 14:32
Default
  #21
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,849
Rep Power: 73
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
Sec. 6.4.3 in the Pope textbook addresses that. Eq.(6.158)-(6.159) shows that the transform of the autocorrelation is nothing else that equivalent to the Fourier transform of the kinetic energy. Of course you should see the hypothesis in terms of isotropy and homogeneity to do that.
FMDenaro is offline   Reply With Quote

Old   May 9, 2021, 06:19
Default
  #22
New Member
 
Join Date: Jan 2021
Posts: 18
Rep Power: 5
digger is on a distinguished road
Dear community,

let me stick to this thread since I don’t want to create another one called “(…) spectrum”. Btw, I think that if there are so many threads devoted to this problem it clearly means that it is not easy to understand, indeed I have hard time to apply the “spectrum” concepts in more practically relevant fluid mechanics problem that I encountered.

From my understanding the characteristic scales in turbulent flow are applicable to the isotropic turbulence. However, in many cases when the Re is not sufficiently high there is no isotropic turbulence anywhere in the jet, but still authors introduce estimated length scales from their experiments. My goal is to quantify the characteristic length scales appearing in my parametric LES simulations of the jet flows.


I have some questions related to that problem:


1. Using the route introduced earlier under this thread we obtained transform of autocorrelation. Can it be inversed to obtain autocorrelation function in the physical space readily usable for calculating, i.e., integral length scale (integral from zero to infinity from the autocorrelation function)?

2. How to find out what is the highest physically correct frequency (lowest) length scale that is representable (physically consistent) on the spectrum from LES simulation in which filtering is introduced implicitly by discretization method? Is the bandwidth limited by the spatial resolution or time resolution or it depends on something else? Let say, my mesh dx=1e-3 m and time step dt=1e-5 s, then the maximum frequency is 100 000 1/s and maximum wavenumber 1000 1/m, both devided by 2?

3. Is this true: “to measure some dominant frequency at some spatial location I only need a time signal from that location but to measure the characteristic length scale I need many signals from spatially distributed probes at a specific time instant”. If not true could you please explain why?



I myself and probably many other users would be grateful for your comments on one or more points from the above list of questions.
digger is offline   Reply With Quote

Old   May 9, 2021, 06:56
Default
  #23
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,849
Rep Power: 73
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
Such a discussion is indeed already addressed elsewhere.
First of all, to give a rude route, the spectral analysis can be performed also in one single spatial direction, provided that the flow is homogeneous in this direction. For example if you have a single jet in a domain you could perform a spectral analysis in spanwise direction assuming periodicity (that is a series of jets).
Lenght scale can be determined by correlation.



In regards of LES analysis, you have several aspects. The LES grid introduced the max representable frequency kNyquist=pi/h (in your case is 1000*pi). But, depending on the shape of the filter (smooth or not), the physical representation of the energy content at frequencies close to kNyquist can be affected by the filtering. In any case the filter should lie before the dissipative range, that is in the LES solution you cannot represent the Taylor microscale as well as, of course, the Kolmogorov one,
FMDenaro is offline   Reply With Quote

Old   June 17, 2021, 13:53
Default
  #24
New Member
 
Join Date: Jan 2021
Posts: 18
Rep Power: 5
digger is on a distinguished road


digger is offline   Reply With Quote

Old   June 17, 2021, 14:03
Default
  #25
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,849
Rep Power: 73
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
Quote:
Originally Posted by digger View Post





First of all, do really you reach pi/dt= 3x10^5 Hz using your probe?
The physical dimensions of the PSD are dictated by the dimension of the Fourier coefficients (squared). I see you do not use any factor so it should be simply (m/s)^2
FMDenaro is offline   Reply With Quote

Old   June 17, 2021, 14:09
Default
  #26
New Member
 
Join Date: Jan 2021
Posts: 18
Rep Power: 5
digger is on a distinguished road
Dear Sir,
my signal is 0.028704 s long and is composed of 16384 data points. This gives 1/(2*dt) = 285 395 Hz
Regards
digger is offline   Reply With Quote

Old   June 17, 2021, 14:27
Default
  #27
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,849
Rep Power: 73
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
Quote:
Originally Posted by digger View Post
Dear Sir,
my signal is 0.028704 s long and is composed of 16384 data points. This gives 1/(2*dt) = 285 395 Hz
Regards



Actually I found a much higher frequency, pi/dt= 1.793*10^6 Hz
FMDenaro is offline   Reply With Quote

Old   June 17, 2021, 15:33
Default
  #28
New Member
 
Join Date: Jan 2021
Posts: 18
Rep Power: 5
digger is on a distinguished road
Please correct me if I am wrong, I think you refer to the angular frequency omega=2*pi*f [rad/s] (not the regular one Hz) which max for my case is omega_max=2*pi*f_max=2*pi*(n_data/T)=2*pi*(16384/0.028704)=3.586e6 [rad/s], so the Nyquist (angular) frequency is indeed omega_max/2=1.793e6 [rad/s].

Why not to express the frequency domain using regular frequency with f_max=1/dt (Hz) where f_Nyq=1/(2*dt)?
digger is offline   Reply With Quote

Old   June 17, 2021, 15:41
Default
  #29
New Member
 
Join Date: Jan 2021
Posts: 18
Rep Power: 5
digger is on a distinguished road
I need to add one more remark. If I scale my PSD frequency axis as it is to express it in Strouhal number I get the peak at St=0.6 (or at f=1000Hz with regards to my current PSD plot) which physically corresponds to the dominant frequency of the “coherent” vortices merging which gives the peak in turbulence intensity plot as my probe is located almost exactly at the end of the potential core of the jet.
digger is offline   Reply With Quote

Old   June 17, 2021, 15:47
Default
  #30
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,849
Rep Power: 73
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
Quote:
Originally Posted by digger View Post
Please correct me if I am wrong, I think you refer to the angular frequency omega=2*pi*f [rad/s] (not the regular one Hz) which max for my case is omega_max=2*pi*f_max=2*pi*(n_data/T)=2*pi*(16384/0.028704)=3.586e6 [rad/s], so the Nyquist (angular) frequency is indeed omega_max/2=1.793e6 [rad/s].

Why not to express the frequency domain using regular frequency with f_max=1/dt (Hz) where f_Nyq=1/(2*dt)?



I consider the cut-off frequency due to a sampling of a signal (space or time is not relevant). That is in your case


f(t) = Sum Fk(t)*exp(i*k*t) being k=n*2*pi/T the frequency.


being T=N*dt, hence


k= n*2*pi/(N*dt)


nmax is the max wavenumber you get from the ratio between the largest wavelenght lambdamax and the smallest wavelenght lambdamin->T/(2*dt)=N/2. Thus


kmax= nmax*2*pi/(N*dt)= (N/2)*2*pi/(N*dt) = pi/dt




Have a look here for more details

https://www.researchgate.net/publica...ing_a_function
FMDenaro is offline   Reply With Quote

Old   June 17, 2021, 16:36
Default
  #31
New Member
 
Join Date: Jan 2021
Posts: 18
Rep Power: 5
digger is on a distinguished road
Thank you Professor for the notes and your time. I must have missed some important concept behind FT and I need to reconsider this once again slowly. My biggest issue is that I don’t really understand why to show a PSD as a function of an angular frequency (pi/dt [rad/s]).




Since Xi is arbitrary, why not to say Xi is an ordinary frequency [Hz]? Nyquist frequency in “your” and “my” definitions differs by a scaling factor 2*pi. I don’t know why it needs to be employed.


I have read your notes and see clearly that you expressed the frequency in terms of radians per s or m. In your notes q_max=L/(2dx) have almost the same meaning that f_nyq=1/(2*dt), since L in q_max cancels out with L in expression for k_max.


I will think about this I don’t want to bother you too much. Thank you once again for your time.
digger is offline   Reply With Quote

Old   June 17, 2021, 17:04
Default
  #32
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,849
Rep Power: 73
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
Quote:
Originally Posted by digger View Post
Thank you Professor for the notes and your time. I must have missed some important concept behind FT and I need to reconsider this once again slowly. My biggest issue is that I don’t really understand why to show a PSD as a function of an angular frequency (pi/dt [rad/s]).




Since Xi is arbitrary, why not to say Xi is an ordinary frequency [Hz]? Nyquist frequency in “your” and “my” definitions differs by a scaling factor 2*pi. I don’t know why it needs to be employed.


I have read your notes and see clearly that you expressed the frequency in terms of radians per s or m. In your notes q_max=L/(2dx) have almost the same meaning that f_nyq=1/(2*dt), since L in q_max cancels out with L in expression for k_max.


I will think about this I don’t want to bother you too much. Thank you once again for your time.



The key is in case of assuming the period to be T=2*pi. In a non-dimensional form you have T=1. Indeed if you compare your definition 1/(2*dt) to my definition (pi/dt) you understand you are considering half-period =1/2 while I have half period = pi.


On the other hand the Fourier series is clearly represented with the basis exp(i*k*x) = cos(n*2*pi*x/L)+i*sin(n*2*pi*x/L)


https://en.wikipedia.org/wiki/Fourier_series
digger likes this.
FMDenaro is offline   Reply With Quote

Old   June 18, 2021, 06:25
Default
  #33
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,849
Rep Power: 73
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
A similar analysis is detailed in the Anderson's textbook, you can read it at page 156.
The expression you use 1/(2*dt) is also reported in literature but you should see the whole picture of the discussion.

If the exp(i*kn*t) is expressed as cos(kn*t)+i*sin(kn*t) one should check if t is dimensional or not.

If it is dimensional then kn is dimensionally a 1/time term. If the period is a general T (s) value (as happens in your problem), the periodicity of the sin/cos functions is expressed for kn=n*2*pi/T (Hz), n being the wavenumber.

Some cases as examples:

- If were T= 2*pi (s) you get kn=n (Hz) and, as nmax=N/2 (N the numbers of time step dt (s), that is T=N*dt=2*pi (s)), you get knmax=nmax=N/2= (pi/dt) (Hz)

- If were T= 1 (s) you get kn=n*2pi (Hz) and, as nmax=N/2 (N the numbers of time step dt, that is T=N*dt=1s), you get knmax= (N/2)*2*pi = pi/dt = pi/dt(Hz)


Conversely, if the analysis is for a non-dimensional sample, it is assumed that the non-dimensional period is Tad=T/Tr=1=N*dtad, knad=kn/kr (subscript r is a reference value) and hence:


knad*kr=n*2*pi/(Tad*Tr)



and assuming kr=2*pi/Tr you have knad=n/Tad=n



Now you have nmax=N/2 and (knad)max=N/2=1/(2*dtad) that is your expression.




This is what I can think of in order to make congruent your definition and my definition. I don't know if some different theoretical analysis could be done.
FMDenaro is offline   Reply With Quote

Old   June 24, 2021, 11:38
Default
  #34
New Member
 
johnwalker01's Avatar
 
John Walker
Join Date: Jun 2021
Location: United States
Posts: 1
Rep Power: 0
johnwalker01 is on a distinguished road
It's a very complicated topic.
__________________
ball marker tool
johnwalker01 is offline   Reply With Quote

Old   April 8, 2022, 20:40
Default power Spectral Density
  #35
New Member
 
Tarek Hadj Hassen
Join Date: Apr 2022
Posts: 6
Rep Power: 4
Tarekhadj is on a distinguished road
Hi All,
I try to draw the power spectral density of a time series in order to compare it with the theoretical one.
The problem is the density value calculated by this script was divided by 1000.

Please can any one check the script ?
This is the link of time series txt file : https://drive.google.com/file/d/1QMc...ew?usp=sharing

Code:
#FFT Analysis
time=elevation[200:11070,0]
H=elevation[200:11070,1]

tfd=np.fft.fft(H)

fft_freq=np.fft.fftfreq(N,time[1]-time[0])

#Power spectral density
PSD=tfd * np.conj(tfd)/np.square(N) 


plt.plot(fft_freq,PSD)
plt.xlim(0,0.4)
#plt.title('spectral density')
plt.xlabel('frequency,f,[Hz]')
plt.ylabel('Spectral density [m**2 s]')
plt.show()
Attached Images
File Type: jpg S(f)calculated.JPG (20.2 KB, 5 views)
File Type: png S(f) reference.PNG (35.6 KB, 4 views)
Tarekhadj is offline   Reply With Quote

Reply


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 Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Energy spectrum-wrong spectrum shape huangxianbei Main CFD Forum 20 June 9, 2024 06:03
power spectrum density hosseini CFX 1 August 31, 2017 08:43
turbulent energy spectrum problem cfd.newbie Main CFD Forum 6 September 24, 2015 17:13
3D Energy Spectrum CFDrookie Main CFD Forum 3 September 23, 2015 11:16
turbulent energy spectrum cfd.newbie FLUENT 0 June 18, 2008 19:34


All times are GMT -4. The time now is 23:41.