Skip to content
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

DBEMT_Mod = -1 for linearization #2427

Merged
merged 3 commits into from
Sep 18, 2024

Conversation

andrew-platt
Copy link
Collaborator

Ready to merge

Feature or improvement description
Aero linearization should be possible with DBEMT_Mod set to -1 (frozen wake)

Related issue, if one exists
The FrozenWake flag was merged into the DBEMT_Mod options in PR #1909

Impacted areas of the software
Linearization with frozen wake was not possible

Copy link
Contributor

@ebranlard ebranlard left a comment

Choose a reason for hiding this comment

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

Thanks!

DBEMT_Init wasn't getting called
@andrew-platt andrew-platt merged commit fd3c82c into OpenFAST:dev Sep 18, 2024
21 checks passed
@@ -636,7 +636,7 @@ subroutine BEMT_Init( InitInp, u, p, x, xd, z, OtherState, AFInfo, y, misc, Inte
if (errStat >= AbortErrLev) return

InitInp_DBEMT%DBEMT_Mod = p%DBEMT_Mod
if ( p%DBEMT_Mod > DBEMT_none ) then
if ( p%DBEMT_Mod > DBEMT_none .or. p%DBEMT_Mod == DBEMT_Frozen ) then
Copy link
Contributor

Choose a reason for hiding this comment

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

maybe this should be rewritten as if ( p%DBEMT_Mod /= DBEMT_none) then

Copy link
Contributor

Choose a reason for hiding this comment

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

Actually... Are you sure the DBEMT module is supposed to be called with frozen wake? I thought it just called a routine in BEMT instead of the DBEMT module.

Copy link
Contributor

Choose a reason for hiding this comment

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

I'm thinking the places where we check p%DBEMT_Mod /= DBEMT_none should be changed to p%DBEMT_Mod > DBEMT_none to avoid the seg fault you were seeing.

Copy link
Collaborator Author

@andrew-platt andrew-platt Sep 18, 2024

Choose a reason for hiding this comment

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

It seems we need DBEMT_Init to get called, otherwise we get a seg fault. But perhaps I addressed the wrong issue with that change. I'll revisit this again shortly (probably another PR).

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I did some quick testing. @bjonkman, I think you are correct. Changing some of the p%DBEMT_Mod /= DBEMT_none to p%DBEMT_Mod > DBEMT_none instead fixes the segfault. I'll post a PR later this evening to revert commit 7305adb and add this correction.

andrew-platt added a commit to andrew-platt/openfast that referenced this pull request Sep 18, 2024
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