FFT for Post Simulation Analysis
Hello Guys, Im looking at using LES to look at plumes in a naturally ventilated building. I have set up statistical results for the velocity, temperature and pressure variables in cfxpre and run the simulation for which I now have the results. I need to now run an FFT analysis on the simulation results I have got. I do have matlab to help out with the FFT. But I need the help of you experts out there to tell how to do this. It would be really great if you could tell me in steps how to take things from cfxpost (for example), to matlab and then run the FFT. Thank you so very much :)

@ faisal
I ran a FFT using MATLAB to find the frequency of vortex shedding for a flow over a bluff body. This is what I did.
Once you get your values of your data wrt time, export everything to EXCEL and make MATLAB read the EXCEL file to get the FFT graph of Power spectrum vs Freq. You can use the readxlsx command in MATLAB to read all your data values. Matlab will read all the data values from the EXCEL file into an ARRAY and then use the FFT function in MATLAB to calculate the Frequency. Hope this helped. 
Quote:

Quote:
Quote:
Quote:
Then write a Matlab script to read values from the EXCEL file that has been created and use the FFT function to get your frequency. Let me know if you need any more help. 
Hi. ojha.mayank485
How do you use FFT in MATLAB? can you explain the syntax of this function that you use it? I do it by Freqz function in MATLAB but my result is not reasonable. Best regards 
Quote:
Hi. ojha.mayank485 How do you use FFT in MATLAB? can you explain the syntax of this function that you use it? I do it by Freqz function in MATLAB but my result is not reasonable. Best regards 
Send me an email at ojha.mayank485@gmail.com and I'll send you the MATLAB script and the xlsx file containing the Cl over my bluff body. It is a small code.
Just looking at the MATLAB syntax will give you a clear idea of what is happening. I have not heard of the freq function. You should be using the FFT inbuild function. 
Thanks for reply Mayank Ojha
Best regards 
Hey Mayank,
I'm interested in exactly the same issue. Do you think it would be possible to have a look at your Matlab script, as well. Would be great and appreciated. thanks inn advance. matt 
Quote:
Could you also send me your matlab script? I'm working on the same thing right now. Thanks! tamubruce at gmail.com 
Just to remind you guys that in the CFDPost you can insert a new Chart XY  Transient or Sequence read data from any monitor point control, file (.csv that you can also export from CFXSolver Manager Monitor) or timedependent expression. Then enable Fast Fourier Transform (FFT) and off you go. This is very handy.
Good luck. 
hello everyone:
there are 3 component for velocity field in my results. In matlab, which velocity is used for getting the energy spectrum. maybe, the turbulence kinetic energy should be calculated for the spectrum, isn't it? 
fft in Matlab
Hello guys, I am at the moment writing a code for solving the fluid motion about a 2D airfoil via a LinearStrengthVortex Method. I am at the point in which I need to validate my unsteady code and therefore I would like to compare my results with some NACA papers in which the coefficients of the Fourier series are plotted. For example:
Cp= Cp0+Cp1s*sin(wt)+Cp1c*cos(wt)+Cp2*sin(2wt+phi) My problem is I don't really understand how to obtain these coefficients from the fft function. What I have is the value of Cp on each panel at each time step: so let's say we have 60 panels and 100 time steps, I have a Cp matrix of Cp(60,100). Applying the fft to this I get again a 60x100 matrix (with complex numbers). I do not know how to use this data. I somewhere found a guid which says the coefficients (a0, a1, b1, a2, b2, ...) are to be calculated via division by N/2... but I still don't understand. Could you help me letting some light in the matter? Thank you very much. A. 
All times are GMT 4. The time now is 06:22. 