
[Sponsors] 
March 27, 2001, 04:46 
Energy spectrum calculation

#1 
Guest
Posts: n/a

Hi,
My simple question is: wath is the best way (and fast) to calculate the energy spectrum of a 2D turbulent velocity field? Thanks in advance for your help 

March 27, 2001, 07:34 
Re: Energy spectrum calculation

#2 
Guest
Posts: n/a

Are you using a spectral code?
What are your boundary conditions? Are you expecting the spectrum to look like "normal" 3D turbulence? (just checking) 

March 27, 2001, 08:25 
Re: Energy spectrum calculation

#3 
Guest
Posts: n/a

Thanks for your answer, Andy,
I have two codes: a DNS and a Kinematical Simulation. The boundary conditions are periodical in a (2pi x 2pi) box. The flow is (theoretically) homogeneous and isotropic. What do you mean with "normal" 3D tuebulence? "5/3" law? No, I don't expect that. 

March 27, 2001, 11:32 
Re: Energy spectrum calculation

#4 
Guest
Posts: n/a

The usual way that to obtain an energy spectrum of a turbulent flow, is first to calculate the kinetic energy (and you can chose each dimension separately E=u**2, E=v**2, or together E=u**2+v**2), then you decompose E as a function of the wave number k (E(k)) by carrying a Fourier Transform, a FFT.
For the FFT to work: E has to be given on discrete points (the grid points) equally spaced (deltax, deltay or whatever). Then E(x,y) is entered in the FFT and E(k) is the output. Here also, you can decide on 1D or 2D FFT. One of the important things, here, is that the output E(k) of the FFT comes in a given order (which is different, depending on which software is used). So the output array for example could be: E(0), E(1), E(2), ... E(M), E(1), E(2), .. E(M+1), where N=2M is the total number of grid points (Fastest when N is a power of 2). The energy spectrum is then the amplitude for each k: 0 sqrt(E(0)**2) 1 sqrt(E(1)**2+E(1)**2) etc.. I hope this helps, Patrick Godon 

March 27, 2001, 12:06 
Re: Energy spectrum calculation

#5 
Guest
Posts: n/a

To add to Patrick's response. I have checked with the people here and they tend to use an assembly language routine for the FFT developed a while a go. If that seems like too much hassle try following a few links from:
http://www.fftw.org/benchfft/ 

March 27, 2001, 13:37 
Re: Energy spectrum calculation

#6 
Guest
Posts: n/a

Energy spectrum is not the Fourier transform of the kinetic energy in physical space. If you want to use physical space quantities to computed the energy spectrum, you need to compute 2point velocity correlation and take FFT with respect to the separation distance. This is quite cumbersome. It is much easier to compute FFTs of u, v and then compute E(k).


March 27, 2001, 15:05 
Correction

#7 
Guest
Posts: n/a

Sorry, my mistake, Kalyan is right, the energy spectrum is given by:
(1/2)*4*pi*k**2*v(k)**2, where v(k) is the FFT of v(x). Thus the square is taken after the FFT is performed. I often decompose 'entities' in 'modes' using FFT, that's how I got mixed up. Thanks Kalyan for correcting me. 

March 29, 2001, 09:40 
Re: Correction

#8 
Guest
Posts: n/a

Thank, Patrick,
I've applied your suggestion and it seems to work better, but I found some "anomalous" behavior at small scales (high k). I think that it can be due to the integration methode. In your last message, you write E(k) = (1/2)*4*pi*k**2*v(k)**2, That true for an isotropic 1D signal, and integrated in 3D. But my signal is 2D, and I have to integrate u(kx,ky)˛ + v(kx,ky)˛ over a 2D shell of radius k, and it is not easy to do. I am thinking in interpolate to a grid (k, phi) and then integrate over phi, but I would need a gridding algorithm, and I have no idea about hoe expensive is it, and where to find this code (ideally, I need just the algorithm in order to implementate a SciLab function). 

March 29, 2001, 10:15 
Re: Correction

#9 
Guest
Posts: n/a

I am not quite sure about grids for interpolation between (I guess probably what you have is a) cartezian and polar grid, since as you interpolate you might introduce error on the small scales.
At the smallest wavelenght (higher k) you should have something (like a viscosity of 'high order'  hyper viscosity) that takes care of dissipation (I am not sure whether you do DNS). There, at the large k, you want to have a steep slope in the spectrum. And you want to have enough resolution (grid points) to resolve the rest of the spectrum (low and intermediate k). Since you have a 2D problem, the energy is going to accumulate in the largest scales (low k  the inverse cascade of energy). Numerical instability and low resolution can introduce twopoint oscillations, therefore large k growth. Whether the resolution is enough or not depends on the scale you want to resolve (and the problem of interest) and the (hyper)viscosity. If the viscosity is too small for a given resolution, then you will not have a steep slope at high k in the spectrum and can have instabilities. You can either increase the viscosity or the resolution. You need for a given resolution to have the high k affected (cut off) by the viscosity. If the viscosity is too large, then you damp too much of your signal at lower k and you cannot resolve the fine structure of the flow. If originally your problem is 'polar', then the best is to use polar coordinate from the start. I have no idea about commercial software for that, since I never use any commercial software. 

March 29, 2001, 13:20 
Re: Correction

#10 
Guest
Posts: n/a

The high wavenumber spectrum has little to do with the timeintegration method unless you are using really high timesteps (see the paper by Choi and Moin in Phys. of Fluids about the effect of time step in DNS and LES). You might get a better idea about what is going on from the suggestion made by Patrick.


April 9, 2010, 12:40 

#11 
New Member

I have a question about turbulent energy spectrum !
Now I have the data of position and velocity at grid. the data is like this: t (time) ,X ,Y, Z , Vx ,Vy ,Vz I have already used FFT to transform Vx ,Vy, Vz to V_kx ,V_ky. V_kz RESPECTLY Now the data is like this: Vx ,Vy, Vz V_kx ,V_ky. V_kz How can I calculate the energy spectrum? 1. How can I calculate the k? 2. V(k) = sqrt(V_kx^2 + V_ky^2), is right?? 3. plot(k,V(K),k^(5/3)) ???? please tell me the detail of the calculation procedure!!! Thanks in advance, 

April 9, 2010, 13:03 

#12 
Senior Member
cfdnewbie
Join Date: Mar 2010
Posts: 557
Rep Power: 12 
Regarding 1:
k is computed from sqrt(kx^2+ky^2+kz^2) greetings cfdnewbie 

April 12, 2010, 11:59 

#14 
New Member
Patrick Godon
Join Date: Apr 2010
Posts: 19
Rep Power: 9 
the k's are just the indices of the discrete Fourier transform in each dimension, you don't compute them, you have them as the indices of your array.


April 12, 2010, 12:53 

#15 
New Member


April 12, 2010, 13:33 

#16 
New Member
Patrick Godon
Join Date: Apr 2010
Posts: 19
Rep Power: 9 
Niet, ya nie Xochu


April 29, 2014, 15:13 

#17 
New Member
Amjad
Join Date: May 2012
Posts: 21
Rep Power: 6 

September 24, 2015, 18:09 
Energy Spectrum for a 3D turbulent Flow

#18 
Senior Member

Dear Community;
I have read many post about the topics but I still have a question. I am working with LES and I want to verify my LES code. Basically I am doing validation using the channel flow data base from JHUTB. So, I have a 3D flow field: u(x,y,z,t),v(x,y,z,t),w(x,y,z,t). I am interesting in compute the power spectrum at each plane. I have read about defining a point a collect the temporal velocity at a single point; which make sense, but I am more interested over the space rather than time..!!! I have read about compute the FFT from the velocity, but from Wilcox book, I read that the Spectrum Energy is the FFT of the velocity correlation tensor. I was planning to use FORTRAN to write the script, but I have read that the majority is using Matlab, so it seems that I will lean towards Matlab. However, I want to have the picture clear before starting!!! Thanks community! 

September 24, 2015, 18:45 

#19 
Senior Member

Dear Mr. kalyan.
Could you please explain in more details your reply. So far I have read that the Energy Spectrum is the FFT of the Velocity Correlation tensor which is cumbersome, I agree. But you claimed that is also possible to obtain the PSD from the FFT of each velocity component How?? I was planning to make my own script in FORTRAN but I does not make sense to reinvent the wheel!. I just want to keep going but I would like to understand the physics. I want to compute the PSD at a fixed height (y + 11.0) along the plane xz 

September 29, 2015, 08:35 

#20  
Senior Member

Quote:
Where does this equation come from. The only equation I have read so far, is the eergy computation from the two point correlation. According to chapter 6 from Pope's book. I do not know where is that equation coming from that allows to circumvent the problem from the two point correlation and the spatial correlations. Thanks 

Thread Tools  
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
ATTENTION! Reliability problems in CFX 5.7  Joseph  CFX  14  April 20, 2010 15:45 
turbulent energy spectrum  cfd.newbie  FLUENT  0  June 18, 2008 18:34 
LES correlation and turbulent energy spectrum  Fabian  Main CFD Forum  4  October 18, 2005 02:04 
Warning 097  AB  CDadapco  6  November 15, 2004 05:41 
Energy Spectrum  Emad Khalifa  Main CFD Forum  3  June 30, 2003 16:03 