CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Programming & Development (https://www.cfd-online.com/Forums/openfoam-programming-development/)
-   -   FFT in OpenFOAM (https://www.cfd-online.com/Forums/openfoam-programming-development/248920-fft-openfoam.html)

sreehahaha April 10, 2023 11:04

FFT in OpenFOAM
 
Dear Foamers,

Hope your'e having a good time.

I'm using OF9 to simulate my system, which has a 3D cubic geometry with cyclic bc in all directions. I need to evaluate the 3D Fourier Transform of temperature field in my system. I want to evaluate this on-the-fly to avoid writing output to the case directory that would eat up my storage space.

Has anyone had any experience with performing FFT in OF? I don't think the forum contains much helpful discussions. If you have, could you please share the snippet here? It would be very helpful.

For starters, I'm confused about the type of the field T_hat that is the Fourier transform of my T field. I assume this would be complexField. But I get an error when I use this: calculated number of cells is incorrect.

Many thanks,
SP

olesen April 13, 2023 16:39

Some code under src/randomProcesses/noise/noiseFFT that might be useful.

dlahaye April 14, 2023 05:19

Alternative is to load data in Paraview and do FFT in paraview.

Other alternative is to search this forum. This FFT issue has been discussed here in the past.


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