API wind spectrum

Discuss the effects of turbulence on wind turbines and its simulation.

Moderator: Bonnie.Jonkman

Luigia.Riefolo
Posts: 20
Joined: Tue Sep 13, 2016 2:24 am
Organization: Polythecnic of Milan
Location: Milan
Contact:

API wind spectrum

Postby Luigia.Riefolo » Mon Aug 07, 2017 9:49 am

Dear all,

I am using TurbSim v2.0 to generate a turbulent wind through API spectrum.
I was wondering if I set something wrong in the input file because I get NaN in most of the outputs (here attached the .hh, .dat and input files).

Please, may you tell me where could be the problem?

Thank you in advance for your kind help

Best regards,
Luigia
Attachments
outputs.jpg
outputs.jpg (180.16 KiB) Viewed 2244 times
input_API.jpg
input_API.jpg (250.5 KiB) Viewed 2244 times

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

Re: API wind spectrum

Postby Jason.Jonkman » Tue Aug 08, 2017 6:44 am

Dear Luigia,

I have no experience with the API spectra in TurbSim, so, may not be able to help. I don't really see anything odd in the portion (upper half) of the TurbSim input file that you show; perhaps there is a problem lower half of the file? You may want to compile TurbSim in debug mode and run your model to identify where the NaNs are coming from.

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

Luigia.Riefolo
Posts: 20
Joined: Tue Sep 13, 2016 2:24 am
Organization: Polythecnic of Milan
Location: Milan
Contact:

Re: API wind spectrum

Postby Luigia.Riefolo » Tue Aug 08, 2017 7:07 am

Dear Jason,

Thank you very much for your quick reply.

Please, find attached the second part of the input file.
Thank you for your suggestion, I will try to compile TurbSim in debug mode and run FAST code to identify where the NaNs are coming from.

Best regards,
Luigia
Attachments
turbsim_input_2nd_part.jpg
turbsim_input_2nd_part.jpg (228.15 KiB) Viewed 2230 times

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

Re: API wind spectrum

Postby Jason.Jonkman » Tue Aug 08, 2017 7:20 am

Dear Luigia,

OK, I don't see anything odd in the lower half of your file either. Hopefully you can find the source of the problem in the debugger.

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

Luigia.Riefolo
Posts: 20
Joined: Tue Sep 13, 2016 2:24 am
Organization: Polythecnic of Milan
Location: Milan
Contact:

Re: API wind spectrum

Postby Luigia.Riefolo » Wed Aug 09, 2017 6:31 am

Dear Jason,

Please, could you tell me who is the person in charge with the implementation of the API (Froya) spectrum in TurbSim ?
I would understand why my simulations run without problems but in the output I have only the fluctuating v and w components of the wind speed and the Reynolds stress, but not the horizontal component.

Thank you in advance for your support

Best regards,
Luigia

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

Re: API wind spectrum

Postby Jason.Jonkman » Wed Aug 09, 2017 7:13 am

Dear Luiga,

Yi Guo of NREL originally implemented the API wind spectrum, but I don't believe she regularly checks this forum. Moreover, there are several people that have worked on the TurbSim code, including Bonnie Jonkman and Marshall Buhl, who no longer work at NREL. It is difficult to support TurbSim in their absence. So again, I suggest that you run the model through the debugger to identify the source of the NaNs. Perhaps one of the DEFAULT parameters is not set properly for the API wind spectrum?

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

Luigia.Riefolo
Posts: 20
Joined: Tue Sep 13, 2016 2:24 am
Organization: Polythecnic of Milan
Location: Milan
Contact:

Re: API wind spectrum

Postby Luigia.Riefolo » Thu Aug 17, 2017 1:31 am

Dear Jason,

I have run the model through the debugger, as you suggested me, and an error came up:
forrtl: severe (408): fort: (11): Subscript #1 of the array Y has value -303174163 which is less than the lower bound of 1.
The problem is in the size of the vectors. In fact, in the file TS_FileIO.f90 the issue is when the Matrix p%grid%Y( p%grid%GridPtIndx(1:p%grid%NumGrid_Y) is computed.
Please, could you ask to Yi Guo of NREL or someone else to check the original code? I have tried to attach also the .exe file but is too big. If you prefer I can send it to you by email. By the way, here enclosed you can find the input and output files.

Thank you in advance for your help

Best regards,
Luigia
Attachments
TurbSim_input_output_files.rar
(894.96 KiB) Downloaded 37 times

Bonnie.Jonkman
Posts: 546
Joined: Thu Nov 10, 2005 10:51 am
Organization: Envision Energy USA
Location: Colorado
Location: Boulder, CO
Contact:

Re: API wind spectrum

Postby Bonnie.Jonkman » Fri Aug 18, 2017 2:56 pm

Hi, Luigia.

I'm not sure why you got the subscript out of range error in the debugger. However, I compiled with the /fpe-all:0 option, which makes the compiler stop any time there is a IEEE numeric issue (underflow, overflow, NaN, Inf, etc.). It flagged a line in the Spec_API() routine, which I then investigated.

It looks like I introduced a bug in the version of TurbSim 2.0 I uploaded just before I left NREL. A character was deleted, resulting in a power operation (**) turning into a multiplication (*) in the API spectra calculations. I fixed the code (line 179 of VelocitySpectra.f90) and uploaded it to https://github.com/old-NWTC/TurbSim. I uploaded my executable to the v2.00.08a-bjj pre-release page.
Bonnie Jonkman

Envision Energy USA, 2016-
National Renewable Energy Laboratory, 2003-2016

Luigia.Riefolo
Posts: 20
Joined: Tue Sep 13, 2016 2:24 am
Organization: Polythecnic of Milan
Location: Milan
Contact:

Re: API wind spectrum

Postby Luigia.Riefolo » Fri Aug 18, 2017 3:38 pm

Dear Bonnie,

Thank you for your reply.
I will try with the fixed version. Please, may you also share the executable for x64 and an example of input for the API spectrum?

Thank you again for your support

Best regards,
Luigia

Luigia.Riefolo
Posts: 20
Joined: Tue Sep 13, 2016 2:24 am
Organization: Polythecnic of Milan
Location: Milan
Contact:

Re: API wind spectrum

Postby Luigia.Riefolo » Sat Aug 19, 2017 4:26 am

Dear Bonnie,

I would let you know that the fixed version of TurbSim is working.
The bug I was getting was related to the code VelocitySpectra.f90.
Finally, please may you share the executable x64 and an example of input for API spectrum?

Thank you very much for your time

Best regards,
Luigia

Bonnie.Jonkman
Posts: 546
Joined: Thu Nov 10, 2005 10:51 am
Organization: Envision Energy USA
Location: Colorado
Location: Boulder, CO
Contact:

Re: API wind spectrum

Postby Bonnie.Jonkman » Mon Aug 21, 2017 9:15 am

Hi, Luigia.

I added an x64 version to the TurbSim release, but have not tested it at all.
Bonnie Jonkman

Envision Energy USA, 2016-
National Renewable Energy Laboratory, 2003-2016


Return to “Inflow Turbulence”

Who is online

Users browsing this forum: No registered users and 1 guest