How to take FFT of csv file containing data with time

Hi!

I want to take four transform over time of lift data that I calculated using openfoam. Since paraview can not read data calculated as function objects in openfoam, I have converted the coeffcients.dat file into a csv file and opened it into paraview. Now I want to take FFT of lift data over time but I don’t know how to do it.

Please guide.

Thanks!

FFT on table has recently been added to ParaView, please try a nightly download from paraview.org.

@timothee.chabat

1 Like

Actually the Table FFT filter has been added in ParaView 5.10 so you can just download the latest release of ParaView. Step to plot your FFT :

  • open your CSV data, apply
  • Hit Ctrl + Space and search for “Table FFT”, Enter. You can now configure some properties for this filter :
    • Create Frequency Column : weither or not to generate a frequency data array. Note that to this filter exptect to have a column called Time in the input in order to compute the sampling frequency. A current limitation of the filter is that you cannot set the sampling frequency yourself.
    • the windowing function
    • if your data is not imaginary, I advise to enable “Optimize for Real Input” (in the advanced options)
    • also in the advanced options, you can choose to average your FFT using fixed-size block of sliding FFT windows (this can make your FFT way faster if you have lot of samples)
  • Once you have setup your FFT, Apply
  • You should now have a plot of your FFT
    • to change the X axis data and the plotted data go to the Display Properties
    • to enable the log scale for the X axis got to the View Properties
2 Likes

Thanks for your reply
I was able to download latest paraview version.
I opened a csv file containting a time column, deselected undesired columns from toggle column and selected only coefficient data along with time data. But when I apply table FFT over it, it gives me error:

Warning: In /builds/gitlab-kitware-sciviz-ci/build/superbuild/paraview/src/VTK/Filters/General/vtkTableFFT.cxx, line 221
vtkTableFFT (0x16ba3a0): ‘Time’ information not found, we will assume a 10’000 Hz sampling rate

Why is it saying time information was not found when I have time column in csv data? or am I missing something
Also, it’s dividing all of my data into x y z and magnitude… why is that so

You can safely ignore the warning message, it is just about the limitation I talked about in my previous message.

Is your time column named “time” (case-independant) ? If not then the filter will not be able to detect it.

Vector field cannot be saved in CSV as the file format does not support having multiple components for a single column, if that’s what you mean. Else
I’m not sure what you’re talking about. Could you share your csv file or a subset of it ?

1 Like

Yes my time column is labelled time

Thanks for your help

Just one thing more, can paraview show stats of FFT like dominant frequency?

There is no FFT stats per se currently in ParaView (but there is some work in progress about it, maybe for PV 5.12 :slightly_smiling_face: ) but you can still use the other tools such as Find Data for things like dominant frequency.

Go to ViewFind Data

  • Data Producer: FFT table filter
  • Elemnt Type: Column
  • Array: FFT_data(magnitude)
  • is max
  • Find Data

and you will find below the point which has the max FFT amplitude.

1 Like