User defined spectrum from routine UserWaveSpctrm in HydroDYn

Provide feedback, request enhancements, and get help with wind-turbine computer-aided engineering tools.

Moderators: Bonnie.Jonkman, Jason.Jonkman

Danupon.Subanapong
Posts: 15
Joined: Sun Jul 17, 2016 11:30 am
Organization: University of Tokyo
Location: Japan

User defined spectrum from routine UserWaveSpctrm in HydroDYn

Postby Danupon.Subanapong » Sun Feb 17, 2019 8:53 pm

Hello!!!
I am now modeling floating offshore wind turbine with semi-submersible platform by using FAST v.8. I have a question about the HydroDyn module. Since I have measured frequency wave spectrum, I am thinking about using "user-defined spectrum from routine UserWaveSpctrm option" in WaveMod input of HydroDyn. However, as far as I understand there is no clear instruction on how to use this and no example as well. So, could you please give me some suggestions?
Thank you
Danupon Subanapong

Jason.Jonkman
Posts: 4223
Joined: Thu Nov 03, 2005 4:38 pm
Location: Boulder, CO
Contact:

Re: User defined spectrum from routine UserWaveSpctrm in HydroDYn

Postby Jason.Jonkman » Mon Feb 18, 2019 6:42 am

Dear Danupon,

Hopefully the UserWaveSpctrm routine in HydroDyn is self-explanatory. This routine is called once per frequency at model initialization and receives the frequency (in rad/s) and direction (in degrees) of the wave component as input and returns the one-sided power-spectral density (PSD) (in m^2/(rad/s)) of the wave component as output. Its up to you how to calculate the one-sided PSD.

Best regards,
Jason Jonkman, Ph.D.
Senior Engineer | National Wind Technology Center (NWTC)

National Renewable Energy Laboratory (NREL)
15013 Denver West Parkway | Golden, CO 80401
+1 (303) 384 – 7026 | Fax: +1 (303) 384 – 6901
nwtc.nrel.gov

Danupon.Subanapong
Posts: 15
Joined: Sun Jul 17, 2016 11:30 am
Organization: University of Tokyo
Location: Japan

Re: User defined spectrum from routine UserWaveSpctrm in HydroDYn

Postby Danupon.Subanapong » Mon Feb 18, 2019 9:35 am

Thank you so much for your reply. As you said
This routine is called once per frequency at model initialization and receives the frequency (in rad/s) and direction (in degrees) of the wave component as input and returns the one-sided power-spectral density (PSD) (in m^2/(rad/s)) of the wave component as output.
, it means that there is an input for frequency and direction of the wave companent. Am I correct?
If correct, the problem is that I cannot find an example of that input in any example of HydroDyn files.
Thank you so much

Jason.Jonkman
Posts: 4223
Joined: Thu Nov 03, 2005 4:38 pm
Location: Boulder, CO
Contact:

Re: User defined spectrum from routine UserWaveSpctrm in HydroDYn

Postby Jason.Jonkman » Mon Feb 18, 2019 4:57 pm

Dear Danupon,

The sample UserWaveSpctrm routine is included in the Waves.f90 source file of HydroDyn. The Omega and WaveDir arguments of the routine are the inputs.

Best regards,
Jason Jonkman, Ph.D.
Senior Engineer | National Wind Technology Center (NWTC)

National Renewable Energy Laboratory (NREL)
15013 Denver West Parkway | Golden, CO 80401
+1 (303) 384 – 7026 | Fax: +1 (303) 384 – 6901
nwtc.nrel.gov

Danupon.Subanapong
Posts: 15
Joined: Sun Jul 17, 2016 11:30 am
Organization: University of Tokyo
Location: Japan

Re: User defined spectrum from routine UserWaveSpctrm in HydroDYn

Postby Danupon.Subanapong » Mon Feb 18, 2019 9:36 pm

Thank you so much for your kind response. It is very clear and helpful.
Best Regards,
Danupon Subanapong

Sai.Chaitanya
Posts: 12
Joined: Sun Nov 25, 2018 9:44 am
Organization: National Institute of Technology Karnataka
Location: India

Re: User defined spectrum from routine UserWaveSpctrm in HydroDYn

Postby Sai.Chaitanya » Fri May 10, 2019 4:58 am

Sir,

I need to plot the Power spectral density of the responses I got using FAST for a spar model. I could not get any code or mathematical background for the same. Please guide me where I can find the mathematical expressions or a code.

Thank you

Jason.Jonkman
Posts: 4223
Joined: Thu Nov 03, 2005 4:38 pm
Location: Boulder, CO
Contact:

Re: User defined spectrum from routine UserWaveSpctrm in HydroDYn

Postby Jason.Jonkman » Fri May 10, 2019 6:47 am

Dear Sai,

The MATLAB-based MCrunch post-processing tool can calculate and plot Power Spectral Densities (PSDs). I've also developed a simple MATLAB-based function that calculates PSDs directly via FFT without windowing that I've attached for your use.

Best regards,

Jason_PSD.m.txt
Simple MATLAB function for calculating PSDs directly via FFT without windowing.
(2.73 KiB) Downloaded 39 times
Jason Jonkman, Ph.D.
Senior Engineer | National Wind Technology Center (NWTC)

National Renewable Energy Laboratory (NREL)
15013 Denver West Parkway | Golden, CO 80401
+1 (303) 384 – 7026 | Fax: +1 (303) 384 – 6901
nwtc.nrel.gov

Sai.Chaitanya
Posts: 12
Joined: Sun Nov 25, 2018 9:44 am
Organization: National Institute of Technology Karnataka
Location: India

Re: User defined spectrum from routine UserWaveSpctrm in HydroDYn

Postby Sai.Chaitanya » Mon May 27, 2019 9:23 am

Dear sir,

Thank you for the code.

I have time series data i.e. in seconds and response in meters. I have gone through the code and being new to MATLAB, as far as I understood, we have to input time series data as 'Data' and should convert it in separately into frequency and input as 'df'.

If it's correct, under what parameter in the code, we should input the response which I have in meter in order to get it on the y-axis as m2/Hz.

Help me in this regard.

Thanks alot
Attachments
Response.txt
(4.69 KiB) Downloaded 30 times
timeseriesdata.txt
(2.82 KiB) Downloaded 28 times

Jason.Jonkman
Posts: 4223
Joined: Thu Nov 03, 2005 4:38 pm
Location: Boulder, CO
Contact:

Re: User defined spectrum from routine UserWaveSpctrm in HydroDYn

Postby Jason.Jonkman » Tue May 28, 2019 6:35 am

Dear Sai,

The Data array should be set to the time-series data (what you attached as Response.txt). The df scalar should be set equal to 1/tmax i.e. one divided by the total simulation length in seconds. From your timeseriesdata.txt file, it looks like you have 600 time steps with a time step size of 1 s, so, df = 1/(600 s).

Best regards,
Jason Jonkman, Ph.D.
Senior Engineer | National Wind Technology Center (NWTC)

National Renewable Energy Laboratory (NREL)
15013 Denver West Parkway | Golden, CO 80401
+1 (303) 384 – 7026 | Fax: +1 (303) 384 – 6901
nwtc.nrel.gov


Return to “Computer-Aided Engineering Software Tools”

Who is online

Users browsing this forum: No registered users and 1 guest