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

Energy Spectrum for a 3D turbulent Flow

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree5Likes
  • 5 Post By FMDenaro

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 24, 2015, 19:10
Default Energy Spectrum for a 3D turbulent Flow
  #1
Senior Member
 
Julio Mendez
Join Date: Apr 2009
Location: Fairburn, GA. USA
Posts: 290
Rep Power: 17
juliom is on a distinguished road
Send a message via Skype™ to juliom
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!!!
juliom is offline   Reply With Quote

Old   September 25, 2015, 11:48
Default
  #2
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,760
Rep Power: 71
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
I used to fix a value of y+ and then perform the FFT of the streamwise (x) and spanwise (z) velocity components along Kx and Kz at each x and z stations of the computatonal grid.
Then, I compute the Euu, Evv and Eww by the squared modulus of the Fourier coefficents performing an average along the plane.

This procedure is used for one field at a characteristic time step and is then repeated for a sufficient number of samples to perform also a time averaging
FMDenaro is offline   Reply With Quote

Old   September 25, 2015, 13:00
Default
  #3
Member
 
Kaya Onur Dag
Join Date: Apr 2013
Posts: 94
Rep Power: 12
kaya is on a distinguished road
If you're going to compare your spectrum with an already given one, you should try to find the way they made their spectrum otherwise I think its very likely that you'll end up with something shifted on y axis.

I had the exact same question months ago. I was trying to validate my LES solver by using this AGARD database. It was an isotropic turbulence decay spectrum at a specific time and whatever I tried, I could not match my power spectrum.

I had a normalization problem and my solution to that was to compute correlations manually (instead of using ffts) and integrate over bins as defined in Pope's book (turbulent flows) section 6.5, but haven't had time to look into this again. Maybe this wouldn't be the best idea, I am not sure tbh.

ps. do yourself a favor and do this in matlab, fortran is an overkill for such thing.
kaya is offline   Reply With Quote

Old   September 25, 2015, 14:44
Default
  #4
Senior Member
 
Julio Mendez
Join Date: Apr 2009
Location: Fairburn, GA. USA
Posts: 290
Rep Power: 17
juliom is on a distinguished road
Send a message via Skype™ to juliom
Dear Professor,
I really appreciate your time replying to my post.!!! I have just a couple of question in regards your variables.
Are you referring to Kinetic Energy when you tiped Kx and Kz or are they the FFT of U (streamwise velocity) and W respectively?
When the average is done over the plane, is the average only for the Fourier coefficients? or from the FFT of the velocity vectors.

Thanks!
juliom is offline   Reply With Quote

Old   September 25, 2015, 14:47
Default
  #5
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,760
Rep Power: 71
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
Kx = n *2*pi/Lx and Kz = m*2*pi/Lz are the spatial frequencies...

The average is performed on the Fourier coefficients
FMDenaro is offline   Reply With Quote

Old   September 25, 2015, 14:51
Default
  #6
Senior Member
 
Julio Mendez
Join Date: Apr 2009
Location: Fairburn, GA. USA
Posts: 290
Rep Power: 17
juliom is on a distinguished road
Send a message via Skype™ to juliom
Thank you very much professor!
juliom is offline   Reply With Quote

Old   September 25, 2015, 15:06
Default
  #7
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,760
Rep Power: 71
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
here a part of my matlab code:

________________
j = 41
%
%
for k=1:l
% 1) ____________ Calcolo di E_uu (stream-wise)______________
% ff è un vettore di appoggio su cui fare la FFT
for i = 1:np+1, ff(i) = u(i,j,k); end
% Trasformata discreta calcolo dei coefficienti di Fourier
c=fft(ff,np); for q = 1:np, c(q)=c(q)/np; end
% Calcolo modulo quadro. Ciclo su ogni armonica k
for q=1:np, cu(q,k)=c(q)*conj(c(q)); end
%
end
%
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
%
%
fmax_x = pi/dx; % frequenza massima di campionamento (Nyquist) lungo x
Ncx = np/2-1; % Numero di campioni in k
kx = 2*pi*(0:Ncx)/lx; % Posizione lungo l'asse delle frequenze NB: sono Ncx + 1 componenti
yrif = (kx(1:Ncx+1)).^(-5./3.); % Pendenza retta inerziale
xc = kx(1:Ncx+1); % Posizioni in frequenza
shuige, randolph, kk415 and 2 others like this.
FMDenaro is offline   Reply With Quote

Old   September 25, 2015, 15:08
Default
  #8
Senior Member
 
Julio Mendez
Join Date: Apr 2009
Location: Fairburn, GA. USA
Posts: 290
Rep Power: 17
juliom is on a distinguished road
Send a message via Skype™ to juliom
Thank you very much professor, this contribution is very important to me!!!! I really appreciate it!
juliom is offline   Reply With Quote

Old   September 25, 2015, 18:41
Default
  #9
Senior Member
 
Julio Mendez
Join Date: Apr 2009
Location: Fairburn, GA. USA
Posts: 290
Rep Power: 17
juliom is on a distinguished road
Send a message via Skype™ to juliom
Professor, form this code I learnt that the Spectrum is done only in one direction (the homogeneous direction). I assumed that this is due to the restriction of the Velocity correlation tensor. AM I right?
I would like to know what does Np stands for? I assumed that this are the number of velocity nodes. Am I right.
Finally professor, I am trying to follow this procedure from Popes textbook.. without luck.. Is there any other texbook you recommend me to follow this explanation?

Thanks!
juliom is offline   Reply With Quote

Old   September 29, 2015, 09:27
Default
  #10
Senior Member
 
Julio Mendez
Join Date: Apr 2009
Location: Fairburn, GA. USA
Posts: 290
Rep Power: 17
juliom is on a distinguished road
Send a message via Skype™ to juliom
Dear professor, I have been following the procedure and I have also trying to match it with Popes; chapter 6. However, the procedure I read there was based on the two-point correlation tensor. Thus, in the homogeneous direction i compute 1/2(Phi_ii) = Fourier transform of the R_ii (two point correlation tensor) in the Homogeneous direction this is not more than the kinetic energy for i = j.
Yet, your script computes the FFT from the velocity component (streamwise) and then it computes magnitude from the Fourier Coefficients (line 5).
Then an average between k and k + 1 is done (line 9).
Is it right?
Why are the Fourier coefficient being divided by 'np' (c(q)=c(q)/np)
Finally, what does np stand for?
Thank you very much professor!!
juliom is offline   Reply With Quote

Old   September 29, 2015, 11:31
Default
  #11
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,760
Rep Power: 71
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
np is the number of cells
FMDenaro is offline   Reply With Quote

Old   October 25, 2021, 17:22
Default
  #12
Member
 
Join Date: Jan 2017
Posts: 71
Rep Power: 9
sadsid is on a distinguished road
Quote:
Originally Posted by juliom View Post
Dear professor, I have been following the procedure and I have also trying to match it with Popes; chapter 6. However, the procedure I read there was based on the two-point correlation tensor. Thus, in the homogeneous direction i compute 1/2(Phi_ii) = Fourier transform of the R_ii (two point correlation tensor) in the Homogeneous direction this is not more than the kinetic energy for i = j.
Yet, your script computes the FFT from the velocity component (streamwise) and then it computes magnitude from the Fourier Coefficients (line 5).
Then an average between k and k + 1 is done (line 9).
Is it right?
Why are the Fourier coefficient being divided by 'np' (c(q)=c(q)/np)
Finally, what does np stand for?
Thank you very much professor!!
Have you implemented the code successfully?
sadsid is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 Flow in Straight Square Duct - k-ep Validation mcclud STAR-CCM+ 2 August 7, 2012 17:56
turbulent energy spectrum cfd.newbie Siemens 1 June 20, 2008 00:48
laminar and turbulent flow in one simulation msna FLUENT 0 January 27, 2007 18:35
Reynolds and Turbulent flow Frederic Dubinski CFX 5 October 21, 2004 05:12
Why FVM for high-Re flows? Zhong Lei Main CFD Forum 23 May 14, 1999 14:22


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