|
[Sponsors] |
January 13, 2021, 13:56 |
|
#21 |
Senior Member
Lucky
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 5,762
Rep Power: 66 |
The peak at 0 Hz is likely because you are forgetting to remove the means. You should be doing the fft of the velocity fluctuations only (which is equivalent of course to simply omitting the plot at 0 Hz).
If you are using matlab, you yourself don't need to zero-pad the data, just pass the proper arguments in the callout to the fft function which is fft(X,NFFT). NFFT is the number of frequency bins in the fft. The data (X) is automatically zero-padded if it's shorter than NFFT and truncated if it's longer than NFFT. zero padding doesn't actually do anything to the spectrum plot except that it allows the frequency bins to land on a desired number, i.e. a frequency of 30 Hz (nice and round) as opposed to 30.2312312312 Hz. |
|
January 16, 2021, 09:41 |
|
#22 |
New Member
Fab
Join Date: Nov 2020
Posts: 25
Rep Power: 6 |
I didnt set periodic boundary conditions, so i guess the time-fft is the way to go.
Thanks LuckyTran for the remarks, i updated my script accordingly. |
|
Tags |
energy, matlab, spectrum |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[Other] Contribution a new utility: refine wall layer mesh based on yPlus field | lakeat | OpenFOAM Community Contributions | 58 | December 23, 2021 03:36 |
pressure in incompressible solvers e.g. simpleFoam | chrizzl | OpenFOAM Running, Solving & CFD | 13 | March 28, 2017 06:49 |
Stuck in a Rut- interDyMFoam! | xoitx | OpenFOAM Running, Solving & CFD | 14 | March 25, 2016 08:09 |
Moving mesh | Niklas Wikstrom (Wikstrom) | OpenFOAM Running, Solving & CFD | 122 | June 15, 2014 07:20 |
Upgraded from Karmic Koala 9.10 to Lucid Lynx10.04.3 | bookie56 | OpenFOAM Installation | 8 | August 13, 2011 05:03 |