Skip to content

fix bug in bldprcnt following issue #3416 - #3424

Merged
andrew-platt merged 3 commits into
OpenFAST:rc-5.0.1from
ptrbortolotti:bldprcnt
Aug 11, 2026
Merged

fix bug in bldprcnt following issue #3416#3424
andrew-platt merged 3 commits into
OpenFAST:rc-5.0.1from
ptrbortolotti:bldprcnt

Conversation

@ptrbortolotti

Copy link
Copy Markdown
Contributor

Work on issue #3416

Thank you @Sparsh-Sharma for the detailed issue. You are very right that the code breaks for BldPrcnt=100. Surprisingly enough, we never set it to 100%, and we never noticed the problem.

I've adopted your suggestion of setting p%startnode = min(p%NumBlNds, 2) instead of p%startnode = max(1, p%NumBlNds - 1).

Next, I think I am good to remove the check p%startnode = max(min(p%NumBlNds,2),p%startnode), which should never be triggered

Lastly, I added a warning if BldPrcnt is smaller than the last element size. I think that's the warning you were recommending. You wrote 'A warning if BldPrcnt is large enough that no node satisfies the threshold might also be worth adding, since the condition is silent today.', but I was a little lost. I think this happens when BldPrcnt is too small, not 'large enough'. Let me know if I am still missing something.

I will also improve the documentation in the r-tests now

@Sparsh-Sharma

Copy link
Copy Markdown

@ptrbortolotti
👍

@andrew-platt andrew-platt added this to the v5.0.1 milestone Aug 11, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Fixes an edge-case in AeroDyn’s AeroAcoustics span-selection logic so that BldPrcnt=100 correctly uses the full blade span (instead of falling back to only the outermost nodes), aligning behavior with the documented meaning and the reported bug in #3416.

Changes:

  • Changes the startnode fallback initialization to min(NumBlNds, 2) so “no node satisfies threshold” correctly degrades to “use the whole blade”.
  • Removes the now-redundant post-loop clamp of startnode.
  • Adds a warning when BldPrcnt is smaller than the last blade element size (i.e., when the minimum-possible span selection is implicitly used).

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread modules/aerodyn/src/AeroAcoustics.f90
Comment thread modules/aerodyn/src/AeroAcoustics.f90 Outdated
Comment thread modules/aerodyn/src/AeroAcoustics.f90
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@andrew-platt
andrew-platt merged commit 6ac408c into OpenFAST:rc-5.0.1 Aug 11, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants