|
[Sponsors] |
June 20, 2014, 14:26 |
Spectrum by using correlation function
|
#1 |
New Member
Victor Cunha
Join Date: Jun 2014
Posts: 1
Rep Power: 0 |
Hi,
That`s the first time I'm calculating energy spectrum and I have seen many examples of calculating the spectrum by using the FFT of the velocity components and then scaling it accordingly. However, I am trying to plot the spectrum using the spatial correlation function and FFT of that. I am not sure about scaling in the frequency. My plot does not show the decaying region. I am using E11(k) = FFT(R11(x)/2) relation. Code:
Lz=16;%length in the x direction R11 = autocorr(u_prime, length(u_prime)-1); NFFT = 2^nextpow2(length(R11)); % Next power of 2 from length of L Y = fft(R11/2,NFFT); E = Y.*conj(Y); f = 2*pi*[0:1:NFFT/2]/Lz; loglog(f,E),':bs', 'MarkerSize',2); hold on loglog(f,10*f.^(-5/3),'r'); hold off |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[blockMesh] Errors during blockMesh meshing | Madeleine P. Vincent | OpenFOAM Meshing & Mesh Conversion | 51 | May 30, 2016 11:51 |
[blockMesh] non-orthogonal faces and incorrect orientation? | nennbs | OpenFOAM Meshing & Mesh Conversion | 7 | April 17, 2013 06:42 |
Version 15 on Mac OS X | gschaider | OpenFOAM Installation | 113 | December 2, 2009 11:23 |
Problem with compile the setParabolicInlet | ivanyao | OpenFOAM Running, Solving & CFD | 6 | September 5, 2008 21:50 |
Please help about the VTKFoam | liugx212 | OpenFOAM Running, Solving & CFD | 0 | November 18, 2005 19:27 |