CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Community Contributions

[waves2Foam] Trying to produce a frequency spectrum of a surface elevation time series

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 16, 2016, 05:47
Default Trying to produce a frequency spectrum of a surface elevation time series
  #1
New Member
 
Maxim Van Zonhoven
Join Date: Nov 2015
Posts: 4
Rep Power: 11
MaximVZ is on a distinguished road
Hi Niels and others,

First of all thank you for providing us with this wonderful toolbox.

I am trying to produce a frequency spectrum of a surface elevation time series (first attach.: SE.jpg).
My FFT knowledge is a little rusty so I would like some help.

The code I use in postProcessingProperties:

deleteParentOutputDirectory false;

regularSpectrum
{
callName surfaceElevation;

removeDuplicate true;
inputDir surfaceElevationAnyName;

deltaT 0.01;
tMin 11; // Default: minimum time
tMax 25; // Default: maximum time

// The action list is a set of processes on the data
actionList (removeSubDirs interpolateSurfaceElevation powerSpectraFFT write2Ascii);

allDataSets yes;

freqBins 1024;
windowShiftFraction 0.5;
}

The result is shown in the second attachment (Spectrum.jpg).

For the most part this seems straightforward, I also checked my interpolated values to make sure they are correct.
I assume a power spectrum instead of an amplitude spectrum is produced?
Also, why do you need to specify freqBins? Isn't this related to the interpolated time step?

However, my experiment is based on: Chen, L. F., Zang, J., Hillis, A. J., Morgan, G. J., & Plummer, A. R. (2014). Numerical investigation of wave-structure interaction using OpenFOAM. Ocean Engineering , 91-109.
They approx. obtain something in the order of magnitude of attachment 3: Spectrum_Chen.

My questions are:

1) Is my spectrum computation correct?
2) How do I transform this to an amplitude spectrum? (for some reason, I achieve somewhat satisfying results by taking the sqrt and dividing this by 2: attach. 3)
3) How do I include zero in my frequency range (there should be some important frequency content around 0 Hz that is now neglected)

Thanks in advance.

Kind regards,

Maxim
Attached Images
File Type: jpg SE.jpg (24.7 KB, 46 views)
File Type: jpg Spectrum.jpg (12.1 KB, 43 views)
File Type: jpg Spectrum_Chen.jpg (15.6 KB, 29 views)
MaximVZ is offline   Reply With Quote

Old   January 19, 2016, 13:16
Default
  #2
ngj
Senior Member
 
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Copenhagen, Denmark
Posts: 1,902
Rep Power: 37
ngj will become famous soon enoughngj will become famous soon enough
Good afternoon all,

I will try to answer some of the questions:

@Maxim: Unless you are using regular waves, I would say that the time series is too short for a evaluation of the power spectrum. If you are using regular wave, please note that there is a method specific for regular waves and based on a least-squares fitting. Please consult the source code (src/waves2FoamProcessing) for more information.

Kind regards,

Niels
__________________
Please note that I do not use the Friend-feature, so do not be offended, if I do not accept a request.

Last edited by wyldckat; August 25, 2018 at 12:53. Reason: removed answers to other posts that were on the main thread
ngj 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
[Other] Contribution a new utility: refine wall layer mesh based on yPlus field lakeat OpenFOAM Community Contributions 58 December 23, 2021 03:36
How to export time series of variables for one point? mary mor OpenFOAM Post-Processing 8 July 19, 2017 11:54
High Courant Number @ icoFoam Artex85 OpenFOAM Running, Solving & CFD 11 February 16, 2017 14:40
Extrusion with OpenFoam problem No. Iterations 0 Lord Kelvin OpenFOAM Running, Solving & CFD 8 March 28, 2016 12:08
Stuck in a Rut- interDyMFoam! xoitx OpenFOAM Running, Solving & CFD 14 March 25, 2016 08:09


All times are GMT -4. The time now is 04:48.