CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Post-Processing (https://www.cfd-online.com/Forums/openfoam-post-processing/)
-   -   fft in openFOAM (https://www.cfd-online.com/Forums/openfoam-post-processing/217491-fft-openfoam.html)

manafaero May 14, 2019 09:48

fft in openFOAM
 
hi

I want to do a FFT of the spatial data, i.e. FFT for the data extracted over a line, This FFT is then computed for each time step in OpenFOAM. Can anybody help me with the same.

Thanking you

Swift May 23, 2019 11:11

Hi Manaf,

Does an FFT of spatial data make sense? What frequency would you expect to get? The mesh size? What are you trying to achieve?

I would think that you need to record the data at a point verses time and take an FFT of that.

If you really want to do as you describe, you should be able to create a line source in paraview and export that for all times to a spreadsheet or csv file. You would then need to use python or similar to reconstruct the data into a format that you could take an FFT.

I don't think there a native way to do FFT in Openfoam.

Good luck.
Thomas

manafaero May 24, 2019 06:11

Thank you sir

gigilentini8 September 10, 2020 14:56

Thomas you are wrong!

there a nice little FFT library in OpenFOAM for cartesian meshes

https://cpp.openfoam.org/dev/dir_afc...e9c4c8c41.html


Quote:

Originally Posted by Swift (Post 734608)
Hi Manaf,

Does an FFT of spatial data make sense? What frequency would you expect to get? The mesh size? What are you trying to achieve?

I would think that you need to record the data at a point verses time and take an FFT of that.

If you really want to do as you describe, you should be able to create a line source in paraview and export that for all times to a spreadsheet or csv file. You would then need to use python or similar to reconstruct the data into a format that you could take an FFT.

I don't think there a native way to do FFT in Openfoam.

Good luck.
Thomas


HPE September 10, 2020 18:13

I increase the bid:

FFTW is a part of OpenFOAM. You can use FFTW inside OpenFOAM, therefore.

PS: at least the com version.


All times are GMT -4. The time now is 12:21.