WISDEM / CCBlade

A blade element momentum method for analyzing wind turbine aerodynamic performance that is robust (guaranteed convergence), fast (superlinear convergence rate), and smooth (continuously differentiable).
Other
43 stars 39 forks source link

Feeding an array of wind speeds vs. Iterating over the radial position #28

Open MiguelMarante opened 1 year ago

MiguelMarante commented 1 year ago

Hello ,

I have been using CCBlade in my master thesis and I have ran into a problem:

Using the example provided on github, I have set the shear exponent to 0, so that I can choose the wind speeds at each radial and azimuthal positions myself.

For azimuth = 0º, I defined the wind profile for each radial position according to the power law with shear exp = 0.2:

image

Then I compute the distributed loads by iterating the "distributedAeroLoads" method throughout each radial position:

image

And the results I get are the same that the program gives if the shear exponent 0.2 was defined as an input to the CCBlade class.

image

However, if I input "wind_shear" as an array, which is way faster, the results are not the same and don't seem to be correct. Here is a plot of the results for azimuth = 0º:

image

My work involves that I loop over this method and it would be very beneficial for me if I could input the wind speed at each radial position as an array, but the results are not correct. I have gone over the source code, but I am new to programming and cannot figure out what might be wrong. Am I missing something?

Best regards, Miguel

ptrbortolotti commented 1 year ago

Hello Miguel, I will need to dig into the code to understand exactly what you are trying to do and why it is not working. Please give me a few days and I'll get back to you. Best regards, Pietro

MiguelMarante commented 1 year ago

Ok, thank you!

ptrbortolotti commented 1 year ago

Hello Miguel, it took me a while to understand what you are trying to do and why it is not working. Thank you for the patience. After some digging, I believe that the issue is that when you pass an array of wind speeds to distributedAeroLoads, the array is neglected and only the first value is used here https://github.com/WISDEM/WISDEM/blob/9a7e811bfb7f31483682d135372f523f8110ea98/wisdem/ccblade/src/bem.f90#L257 The reason that distributedAeroLoads accepts arrays as inputs is that it can run parametric studies across combinations of wind speeds, rotor speeds, pitch angles, and blade azimuthal positions. You are trying to do something else, and you will need to work on the Fortran code at the link above. I hope this helps. Regards, Pietro

MiguelMarante commented 1 year ago

Hello Dr. Pietro,

Thank you for taking the time to work on this problem. I will try to dig deeper into the fortran code and see if there is anything I can do there.

Best regards, Miguel