CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > CFX

FFT for Post Simulation Analysis

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 1 Post By ojha.mayank485
  • 1 Post By ojha.mayank485

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 31, 2011, 05:59
Default FFT for Post Simulation Analysis
  #1
Member
 
Faisal Durrani
Join Date: Nov 2009
Location: England
Posts: 62
Rep Power: 17
faisal_durr is on a distinguished road
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 cfx-pre 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 cfx-post (for example), to matlab and then run the FFT. Thank you so very much
faisal_durr is offline   Reply With Quote

Old   May 31, 2011, 17:20
Default @ faisal
  #2
New Member
 
ojha.mayank485's Avatar
 
Mayank Ojha
Join Date: May 2011
Posts: 22
Rep Power: 15
ojha.mayank485 is on a distinguished road
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.
openfoam_aero likes this.
ojha.mayank485 is offline   Reply With Quote

Old   June 7, 2011, 08:03
Default
  #3
Member
 
Faisal Durrani
Join Date: Nov 2009
Location: England
Posts: 62
Rep Power: 17
faisal_durr is on a distinguished road
Quote:
Originally Posted by ojha.mayank485 View Post
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.
Hey buddy thanks for the reply. I am also looking at vortex shedding myself. I would love to see your work if its published or your theses if you have written one. I have some questions I would like you to answer please. I am thinking of plotting velocity vs. time to get the graph. This will be done at a specific point right with the help of monitors right? And one i plot this as a chart in post then I will export the chart to excel, am I correct? Thanks for the help
faisal_durr is offline   Reply With Quote

Old   June 7, 2011, 18:57
Default
  #4
New Member
 
ojha.mayank485's Avatar
 
Mayank Ojha
Join Date: May 2011
Posts: 22
Rep Power: 15
ojha.mayank485 is on a distinguished road
Quote:
Originally Posted by faisal_durr View Post
Hey buddy thanks for the reply. I am also looking at vortex shedding myself. I would love to see your work if its published or your theses if you have written one. I have some questions I would like you to answer please. I am thinking of plotting velocity vs. time to get the graph. This will be done at a specific point right with the help of monitors right? And one i plot this as a chart in post then I will export the chart to excel, am I correct? Thanks for the help
Quote:
I would love to see your work if its published or your theses if you have written one
I do not have anything published results yet. I have a few stuff remaining to do.

Quote:
I am thinking of plotting velocity vs. time to get the graph. This will be done at a specific point right with the help of monitors right? And one i plot this as a chart in post then I will export the chart to excel, am I correct?
For me I plotted the forces over the surface but you can certainly do it for a point. YES !!!! Then right click on the plot and export it to EXCEL.

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.
ojha.mayank485 is offline   Reply With Quote

Old   June 8, 2011, 08:11
Default
  #5
Senior Member
 
omid
Join Date: Apr 2011
Posts: 105
Rep Power: 15
omidiut is on a distinguished road
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
omidiut is offline   Reply With Quote

Old   June 8, 2011, 08:13
Default
  #6
Senior Member
 
omid
Join Date: Apr 2011
Posts: 105
Rep Power: 15
omidiut is on a distinguished road
Quote:
Originally Posted by ojha.mayank485 View Post
I do not have anything published results yet. I have a few stuff remaining to do.



For me I plotted the forces over the surface but you can certainly do it for a point. YES !!!! Then right click on the plot and export it to EXCEL.

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
omidiut is offline   Reply With Quote

Old   June 8, 2011, 13:22
Default
  #7
New Member
 
ojha.mayank485's Avatar
 
Mayank Ojha
Join Date: May 2011
Posts: 22
Rep Power: 15
ojha.mayank485 is on a distinguished road
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 in-build function.
Subrahmanyam likes this.
ojha.mayank485 is offline   Reply With Quote

Old   June 8, 2011, 16:11
Default
  #8
Senior Member
 
omid
Join Date: Apr 2011
Posts: 105
Rep Power: 15
omidiut is on a distinguished road
Thanks for reply Mayank Ojha
Best regards
omidiut is offline   Reply With Quote

Old   August 5, 2011, 20:37
Default
  #9
New Member
 
MG
Join Date: Aug 2009
Posts: 7
Rep Power: 17
zoozoozoo is on a distinguished road
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
zoozoozoo is offline   Reply With Quote

Old   September 3, 2011, 17:59
Default
  #10
Member
 
Join Date: Apr 2011
Location: US
Posts: 43
Rep Power: 15
famerfamer is on a distinguished road
Quote:
Originally Posted by omidiut View Post
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
Hey,

Could you also send me your matlab script? I'm working on the same thing right now. Thanks! tamubruce at gmail.com
famerfamer is offline   Reply With Quote

Old   September 5, 2011, 07:38
Default
  #11
Sal
New Member
 
Join Date: Jun 2011
Posts: 15
Rep Power: 15
Sal is on a distinguished road
Just to remind you guys that in the CFD-Post 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 CFX-Solver Manager Monitor) or time-dependent expression. Then enable Fast Fourier Transform (FFT) and off you go. This is very handy.
Good luck.
Sal is offline   Reply With Quote

Old   September 14, 2011, 07:07
Default
  #12
New Member
 
ya
Join Date: Apr 2011
Posts: 7
Rep Power: 15
rujia is on a distinguished road
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?
rujia is offline   Reply With Quote

Old   March 13, 2012, 04:35
Default fft in Matlab
  #13
New Member
 
Anthony
Join Date: Jul 2011
Posts: 9
Rep Power: 15
Sonik_87 is on a distinguished road
Hello guys, I am at the moment writing a code for solving the fluid motion about a 2D airfoil via a Linear-Strength-Vortex 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.
Sonik_87 is offline   Reply With Quote

Reply


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
Fluid structure interaction jnattia Main CFD Forum 25 May 21, 2015 10:16
1d analysis and simulation of gas turbine power plant sridhar.d009 FLUENT 0 September 28, 2010 08:46
1D analysis and simulation of gas turbine power plant sridhar.d009 Main CFD Forum 1 September 28, 2010 08:38
velocity profile export from a simulation onto another sudhirlv STAR-CCM+ 1 September 12, 2010 19:57
3-D Contaminant Dispersal Simulation Apple L S Chan Main CFD Forum 1 December 23, 1998 11:06


All times are GMT -4. The time now is 19:07.