CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Main CFD Forum (https://www.cfd-online.com/Forums/main/)
-   -   turbulent energy spectrum problem (https://www.cfd-online.com/Forums/main/15321-turbulent-energy-spectrum-problem.html)

 cfd.newbie June 18, 2008 18:32

turbulent energy spectrum problem

Hi

I want to calculate energy spectrum for my LES simulation. I put a point in domain and monitored u, v and w velocities. I calculated the kinetic energy from my velocities and imported the kinetic data and time into matlab. I, then, converted my time domain into frequency domain by using fft.

How do I draw energy spectrum then? In book there is E(k) on y-axis and k (wave number) on x-axis. Is E(k) same as kinetic energy which is 0.5(u^2+v^2+w^2)? How do I calculate k (wave number) on x-axis? Thanks in advance for your answer.

 Patrick June 20, 2008 12:00

Re: turbulent energy spectrum problem

In order to calculate the energy spectrum you need to have the velocities monitores on all your grid points. You need to compute E as the sum of all the kinetic energies in all the 3 dimension (as you wrote) for all your domain points at only one time t! THen you can either average E in each dimension or just keep E as a function of the entire domain. Now you should have this done for many time t, and averaged over the entire period T=t1+t+2+..tn. ONce you have the time-averaged kinetic energy E as a function of space you can carry out FFT in each dimension (either at a specific location or again averaging over surfaces).

Say in a one-dimensional problem you have

E=rho*v_x^2 at a time t.

You compute E(t) for all t from t=0 to t=T and you average E over T

E = sum_i E(t_i)*(t_i+1 t_i)/T

THen you are left with E(x) at discrete location x_i.

Then you carry out an FFT on E(x_i) (i=1,N) and you obtain E(k).

If your entire domain is D and you have N points there, then delta x= D/N. k=1 correspond to a wavelenght lambda=D k=2 correspoinds to a wavelength D/2

etc...

k=N/2 corresponds to a wavelength 2D/N

In two dimension you will have different k's: k_x and k_y. To compute E(k_x) you need to average E(x,y) over t again but also over y so that you are left with E(x) only and again carry out an FFT. For the y dimension you need to average over x and get E(y). An FFT of E(y) brings you E(k_y).

In 3D you have k_x, k_y, k_z. In order to obtain E(x) you need to averages (discrete integration) over y and z, and of course t, then you can do the FFT for x. similarly for y and z.

The Energy spectrum is not as a function of frequency (time) but it is about wavelength with k=2*pi/lambda where lambda is the wavelength (spatial dimension, NOT time).

Look into Numerical Recepices. Check CFD books and see what they have on this CFD site.

It is not the time domain that you convert into frequencies but the space domain (after averaging over time).

 wgq521 January 25, 2015 10:36

Quote:
 Originally Posted by Patrick ;55543 In order to calculate the energy spectrum you need to have the velocities monitores on all your grid points. You need to compute E as the sum of all the kinetic energies in all the 3 dimension (as you wrote) for all your domain points at only one time t! THen you can either average E in each dimension or just keep E as a function of the entire domain. Now you should have this done for many time t, and averaged over the entire period T=t1+t+2+..tn. ONce you have the time-averaged kinetic energy E as a function of space you can carry out FFT in each dimension (either at a specific location or again averaging over surfaces). Say in a one-dimensional problem you have E=rho*v_x^2 at a time t. You compute E(t) for all t from t=0 to t=T and you average E over T E = sum_i E(t_i)*(t_i+1 t_i)/T THen you are left with E(x) at discrete location x_i. Then you carry out an FFT on E(x_i) (i=1,N) and you obtain E(k). If your entire domain is D and you have N points there, then delta x= D/N. k=1 correspond to a wavelenght lambda=D k=2 correspoinds to a wavelength D/2 etc... k=N/2 corresponds to a wavelength 2D/N In two dimension you will have different k's: k_x and k_y. To compute E(k_x) you need to average E(x,y) over t again but also over y so that you are left with E(x) only and again carry out an FFT. For the y dimension you need to average over x and get E(y). An FFT of E(y) brings you E(k_y). In 3D you have k_x, k_y, k_z. In order to obtain E(x) you need to averages (discrete integration) over y and z, and of course t, then you can do the FFT for x. similarly for y and z. The Energy spectrum is not as a function of frequency (time) but it is about wavelength with k=2*pi/lambda where lambda is the wavelength (spatial dimension, NOT time). Look into Numerical Recepices. Check CFD books and see what they have on this CFD site. It is not the time domain that you convert into frequencies but the space domain (after averaging over time).
This is totally wrong method.

 romant March 3, 2015 11:31

If this is a totally wrong method, please supply the right method. More constructive criticism please.

 juliom September 24, 2015 15:22

Dear Patrick;
I read your reply for the turbulent Energy Spectrum. I need to write my own script to do this in FORTRAN because I have the LES solution. From your explanation, do you have a textbook or paper which describes the procedure?? I am reading Wilcox book but I am still pretty loss!!!

Thanks!!!

 FMDenaro September 24, 2015 16:03