CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Main CFD Forum (https://www.cfd-online.com/Forums/main/)
-   -   HELP (https://www.cfd-online.com/Forums/main/1891-help.html)

John March 4, 2000 17:42

HELP
 
Hi, there,

I have some turbulent kinetic energy data, and I want to transform them to spectral space and get the plot. Does anybody know how I can do it, and is there any place where I can get a free code to fix it. Thanks in advance.

John

Patrick Godon March 6, 2000 10:24

Re: HELP
 
You need to use any available FFT (and there are many) to make a FOurier Transform to your data. THere are also many ways of doing that depending on the symmetry of your flow problem and whether it is time-dependent, 1D, 2D or 3D, etc...

So if you want to check the energy spectrum in a given direction, say x, you need to have E (the kinetic energy) as a function of x: E(x). If you have an additional dimension (say y, for example) then usually one integrates in y the kinetic energy to obtain an y-averaged value of E(x). Once you have the value of E(x) at discrete points in x, you need to do a discrete Fourier Transform of E(x) into E(k), where now k is the spectral index. E(k) has real values as well as imaginary values and you need to check the absolute value of E(k): (Im(E)**2+Re(E)**2)**0.5 . Remember that if you have N points x, then k will take the following values: k=-N/2+1, -N/2+2, ..-1, 0, 1, 2, ..N/2. So you will need to add the negative indexes to the positive ones. If you have a time dependent problem, then you need to average E(k) in time, this can be done easily by taking many snapshots of E(k) and just averaging between them (adding them and dividing by the number of snapshots).

PG


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