|
[Sponsors] |
April 10, 2009, 03:21 |
|
#7 |
New Member
Yilei Shi
Join Date: Apr 2009
Posts: 5
Rep Power: 17 |
thx ngrube, i have tried it. But the result is not good!!
The curve has big oszillation. Maybe can you check my code? clc; clear all; close all; Data = load('tg3dn'); E = zeros(1024,1); L = 1; N = 1:32; kx = (2 * pi .* N / L)'; ky = (2 * pi .* N / L)'; kz = (2 * pi .* N / L)'; v = reshape(Data(:,4),32,32,32); u = reshape(Data(:,5),32,32,32); w = reshape(Data(:,6),32,32,32); V = fftn(v); U = fftn(u); W = fftn(w); for i = 1:32, for j = 1:32, for m = 1:32, k = round(sqrt(kx(i)^2 + ky(j)^2 + kz(m)^2)); E(k) = E(k) + abs(V(i,j,m))^2 + abs(U(i,j,m))^2 + abs(W(i,j,m))^2; end end end index = find(E~=0); E_index = E(index); loglog(index,E_index,index,index.^(-5/3)); |
|
Tags |
energy spectrum, fft |
|
|
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 |