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

Energy Spectrum !!!

Register Blogs Community New Posts Updated Threads Search

Like Tree40Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 20, 2012, 09:34
Default code request
  #21
New Member
 
Join Date: Jun 2012
Posts: 7
Rep Power: 13
S.J.Daniels is on a distinguished road
Hi everyone,

Can someone please send me the matlab code as well? - sjd1e11@soton.ac.uk.

Many Thanks,

Steven
S.J.Daniels is offline   Reply With Quote

Old   August 21, 2012, 06:45
Default
  #22
New Member
 
Martin Söder
Join Date: Jun 2011
Posts: 8
Rep Power: 14
Soder is on a distinguished road
Hi,
I would also be interested in the code, and would be very thankful if I could get it
martins@mech.kth.se

/Martin
Soder is offline   Reply With Quote

Old   November 1, 2012, 00:15
Default turbulence spectrum
  #23
New Member
 
Join Date: Nov 2012
Posts: 1
Rep Power: 0
nikizat is on a distinguished road
hi,

i'm doing my undergrad final year prjct on simulation of atmospheric boundary layer in wind tunnel.....have to measure wind profile, turbulence intensities and turbulence spectrum....

can anybody help with the turbulence spectrum....what i need to measure...how to get the plot?

thank you in advance
nikizat is offline   Reply With Quote

Old   November 2, 2012, 08:53
Default
  #24
New Member
 
Kevii
Join Date: Nov 2012
Posts: 1
Rep Power: 0
KidMoD is on a distinguished road
wow aye
doing spectum always does my head in everytime :\
i suck at this T__T
KidMoD is offline   Reply With Quote

Old   February 8, 2013, 16:20
Default Autocorrelation Function help
  #25
New Member
 
Kealie Goodwin
Join Date: Feb 2013
Posts: 2
Rep Power: 0
kgoodwin is on a distinguished road
I am also trying to compute the turbulence energy spectrum for some velocity data I have.

My data are taken with a profiling ADV so I have u, v, w velocities for 12 points along a depth profile. These data are collected over time, which is used for a x-space proxy.

In short, I have u, v, w velocity data spatially distributed across x and z dimensions (only one point in y-direction). So, 3 matrices that are 1501 (x) by 12 (z), one each for u, v, w.

I understand all the steps of calculating the energy spectrum. My only problem is that I'm not sure I completely understand the autocorrelation step in Pope, especially with respect to my data.

R_ij(r, x) = <u_i(x) u_j(x+r)>
The <> notation is an average, correct? What does this mean for a scalar? Or is this the dot product notation? Again what does this mean for a scalar?

If anyone has any matlab code for this portion that they are willing to share, it would be helpful.

Thanks!
kgoodwin is offline   Reply With Quote

Old   February 9, 2013, 04:01
Default
  #26
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,764
Rep Power: 71
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
just consider a 3d Cartesian mesh and (j,k) some fixed positions. This is some lines of my Matlab code for the energy spectrum

% ____________ E_uu (stream-wise)______________
% ff is a dump array for using the FFT of the field u(i,j,k)
for i = 1:np+1, ff(i) = u(i,j,k); end
% Discrete transform: computation of the Fourier coefficient
c=fft(ff,np); for q = 1:np, c(q)=c(q)/np; end
% Computation of the modulus squared. Cycle for all the wavenumbers
for q=1:np, cu(q,k)=c(q)*conj(c(q)); end

Then, you must simply plot your power spectrum.
Generally, the computed spectrum are also computed along the whole homogeneous directions (e.g. for all the k) and then averaged to have a statistically meaning.
FMDenaro is offline   Reply With Quote

Old   February 12, 2013, 12:30
Default
  #27
New Member
 
Kealie Goodwin
Join Date: Feb 2013
Posts: 2
Rep Power: 0
kgoodwin is on a distinguished road
Thank you for your code, FMDenaro. However, it's difficult for me to understand your process without your data. Does anyone have the math formulas they used for the autocorrelation? Again, the steps I'm using are:
1. Calculate autocorrelation to get signal into wave number space
2. Take fft
3. Calculate energy
E(k) = E(k) + abs(V(i,j,m))^2 + abs(U(i,j,m))^2 + abs(W(i,j,m))^2;
4. plot energy vs wave number
kgoodwin is offline   Reply With Quote

Old   March 23, 2013, 21:54
Default
  #28
Member
 
ehk
Join Date: Sep 2012
Posts: 30
Rep Power: 13
ehsankf is on a distinguished road
modes should change from -N/2:N/2.
ehsankf is offline   Reply With Quote

Old   May 4, 2013, 12:30
Default
  #29
Senior Member
 
Bobby
Join Date: Oct 2012
Location: Michigan
Posts: 454
Rep Power: 15
babakflame is on a distinguished road
Dear FMDenaro

Thanks for sharing ur code.

Last edited by babakflame; May 4, 2013 at 12:50.
babakflame is offline   Reply With Quote

Old   May 28, 2013, 09:55
Default The code
  #30
New Member
 
martin lindström
Join Date: Apr 2013
Posts: 1
Rep Power: 0
martli is on a distinguished road
Can you please send me the code as well? martinrjl@gmail.com
Thank you in advance!
martli is offline   Reply With Quote

Old   June 20, 2013, 16:07
Default
  #31
New Member
 
Join Date: Jun 2013
Posts: 10
Rep Power: 12
alexbn024 is on a distinguished road
If somebody can share the code for energy spectrum calculation I would greatly appreciate that. My email is: alexbn024@gmail.com
alexbn024 is offline   Reply With Quote

Old   July 10, 2013, 16:07
Default
  #32
New Member
 
Nik
Join Date: Jun 2013
Posts: 1
Rep Power: 0
nthomare is on a distinguished road
Can you send me the matlab code as well please? Thank you very much. My email is nikthomar@gmail.com.
nthomare is offline   Reply With Quote

Old   September 6, 2013, 04:56
Default
  #33
New Member
 
Terrence Nguyen
Join Date: Jan 2012
Posts: 13
Rep Power: 14
hismother is on a distinguished road
Can anyone also send me the matlab code for the energy spectrum calculation, please??
My email is: sonnyvo018@yahoo.de
hismother is offline   Reply With Quote

Old   September 6, 2013, 06:37
Default
  #34
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,764
Rep Power: 71
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
there is nothing else to do that loading the data in matlab, calling the built-in FFT and plotting the modulus of the Fourier coefficients versus the frequencies
FMDenaro is offline   Reply With Quote

Old   November 4, 2013, 12:17
Default
  #35
New Member
 
Arne
Join Date: Oct 2013
Posts: 16
Rep Power: 12
Arne87 is on a distinguished road
Hey

could someone please send me the code.
my email adress : arne-eggers@web.de


Arne87 is offline   Reply With Quote

Old   November 6, 2013, 16:32
Default
  #36
Senior Member
 
cfdnewbie
Join Date: Mar 2010
Posts: 557
Rep Power: 20
cfdnewbie is on a distinguished road
The question has been answered in the posts above by FMDenaro, including the code! It is 3 lines in Matlab, that should be doable...
cfdnewbie is offline   Reply With Quote

Old   December 4, 2013, 03:06
Default
  #37
New Member
 
Christian
Join Date: Dec 2013
Posts: 1
Rep Power: 0
christian08 is on a distinguished road
Hi Everyone,

I am currently trying to perform a problem similar to this one except with a different geometry. Could someone please forward me the matlab code harish sent? My email is combustion.spot@gmail.com

Thank you in advance
christian08 is offline   Reply With Quote

Old   January 16, 2014, 07:51
Default
  #38
Senior Member
 
S.Bogoda
Join Date: Jul 2012
Posts: 133
Rep Power: 13
sakurabogoda is on a distinguished road
Hi,
Could somebody pls send me the matlab code? sakurabogoda@gmail.com
sakurabogoda is offline   Reply With Quote

Old   March 24, 2014, 01:38
Default code for energy spectra
  #39
Senior Member
 
chandra shekhar pant
Join Date: Oct 2010
Posts: 220
Rep Power: 16
chandra shekhar pant is on a distinguished road
Can anyone send the code for energy spectra to me also. chandukec@gmail.com
It will be a great help. Thanks in advance
chandra shekhar pant is offline   Reply With Quote

Old   April 20, 2014, 21:40
Default
  #40
Senior Member
 
Huang Xianbei
Join Date: Sep 2013
Location: Yangzhou,China
Posts: 302
Rep Power: 13
huangxianbei is on a distinguished road
Quote:
Originally Posted by FMDenaro View Post
just consider a 3d Cartesian mesh and (j,k) some fixed positions. This is some lines of my Matlab code for the energy spectrum

% ____________ E_uu (stream-wise)______________
% ff is a dump array for using the FFT of the field u(i,j,k)
for i = 1:np+1, ff(i) = u(i,j,k); end
% Discrete transform: computation of the Fourier coefficient
c=fft(ff,np); for q = 1:np, c(q)=c(q)/np; end
% Computation of the modulus squared. Cycle for all the wavenumbers
for q=1:np, cu(q,k)=c(q)*conj(c(q)); end

Then, you must simply plot your power spectrum.
Generally, the computed spectrum are also computed along the whole homogeneous directions (e.g. for all the k) and then averaged to have a statistically meaning.
Hi,Filippo
I think the third line should be: cu(q)=c(q)*conj(c(q))
As known, the velocity spectrum tensor is
phi[i,j](k)=cu(k),the energy spectrum is integrated to
E(k)=1/2*cu(k)*dS(k)
where S(k) is the sphere's surface area with radius mag(k)
is this means to calculate E(k)=1/2*cu(k)*4*pi*k^2?
huangxianbei is offline   Reply With Quote

Reply

Tags
energy spectrum, fft


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
turbulent energy spectrum problem cfd.newbie Main CFD Forum 6 September 24, 2015 16:13
turbulent energy spectrum cfd.newbie Siemens 1 June 19, 2008 23:48
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
Energy Spectrum Emad Khalifa Main CFD Forum 3 June 30, 2003 16:03


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