-
Notifications
You must be signed in to change notification settings - Fork 469
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix potential error when requesting wind below the ground (also fix build issue with SD syntax) #1534
Conversation
It was possible to return NaN or have shear added below ground/MSL.
Seems like there is an intermittent failure with the r-tests again; this time with the rtest-interfaces check. I reran the failing case on 7a35023 and it passed the second time (with no code changes) |
@bjonkman, thanks for taking a look at this. You're right that |
@deslaughter, I think the horizontal and vertical shear that are added in those routines is mostly for the native Bladed format 3D grid files; that's something Envision added, but I don't think OpenFAST has any tests for, yet. |
@bjonkman, that does explain why it wasn't caught in testing. If you could send a small native Bladed wind file, I'd be happy to add it to the regression tests. |
Will the checks for above ground cause issues with MHK turbines? Or are those currents based on the ground located at the seafloor? |
call LegacyWarning('Member table contains 6 columns instead of 7, using default member directional cosines ID (-1) for all members.\ | ||
The directional cosines will be computed based on the member nodes for all members.') | ||
call LegacyWarning('Member table contains 6 columns instead of 7, using default member directional cosines ID (-1) for all members. & | ||
&The directional cosines will be computed based on the member nodes for all members.') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't know you could continue a string to the next line this way.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't typically use this format for continuing a string, but it's legal: https://www.intel.com/content/www/us/en/docs/fortran-compiler/developer-guide-reference/2023-1/free-source-form.html
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I learned something new today :)
Basically, this just says if we are asking for mean velocities below the ground or MSL, they should return 0. The power law case returns NaN if z is negative and the power-law coefficient is less than 1 (typical use case), so that wouldn't make sense if z < 0. The log profile also doesn't make sense mathematically if Z <=0. I'm not sure how they've set up modeling for MHK turbines, but I don't think this should hurt. |
Good point. That would result in nonsensical results. |
We leave InflowWind alone for MHK and adjust the query points from the glue code before the are passed to InflowWind to put the origin at the seabed (as if it was the ground). So I don't think this will cause an issue. |
Feature or improvement description
This fixes a couple of issues:
Related issue, if one exists
None reported on OpenFAST code.
Impacted areas of the software
Any place that requests inflow below the ground; likely not a common occurrence.
Also note the question in IfW_FlowField.f90's
GetMeanVelocity
function: I am not sure why it is not adding the mean horizontal or vertical shear there.Test results, if applicable
This should not change any existing r-test cases since they likely don't request wind speeds below z=0.