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

Fixed incorrect surface moment derivatives and added a moment output to the component #449

Merged
merged 12 commits into from
Dec 18, 2024

Conversation

sabakhshi
Copy link
Contributor

Purpose

Adds moment as a directly output from OAS in addition to CM. Fixes bugs related to derivative computation for CM. Adds significant commentary to the derivative code to explain what is going on. Cleans up code.

Expected time until merged

1 week

Type of change

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (non-backwards-compatible fix or feature)
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no API changes)
  • Documentation update
  • Maintenance update
  • Other (please describe)

Testing

Some of the derivative updates need to be checked.

Checklist

  • I have run flake8 and black to make sure the Python code adheres to PEP-8 and is consistently formatted
  • I have formatted the Fortran code with fprettify or C/C++ code with clang-format as applicable
  • I have run unit and regression tests which pass locally with my changes
  • I have added new tests that prove my fix is effective or that my feature works
  • I have added necessary documentation

…s related derivatives wrt reference area, chords, and panel width. Add output for moment with derivatives
@sabakhshi sabakhshi requested a review from a team as a code owner December 11, 2024 08:28
@sabakhshi sabakhshi requested review from bernardopacini, eytanadler and kanekosh and removed request for bernardopacini December 11, 2024 08:28
Copy link
Collaborator

@eytanadler eytanadler left a comment

Choose a reason for hiding this comment

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

Thanks @sabakhshi! More comments are always appreciated, particularly in complex derivative routines.

openaerostruct/functionals/moment_coefficient.py Outdated Show resolved Hide resolved
openaerostruct/functionals/moment_coefficient.py Outdated Show resolved Hide resolved
tests/functionals_tests/test_moment_coefficient.py Outdated Show resolved Hide resolved
@sabakhshi sabakhshi requested a review from eytanadler December 11, 2024 20:36
Copy link
Contributor

@kanekosh kanekosh left a comment

Choose a reason for hiding this comment

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

Nice catch! I know you're working on it but I'm writing down as a note:
Test setup should be updated to be physically valid and to avoid false positive, which the current test does.

openaerostruct/functionals/moment_coefficient.py Outdated Show resolved Hide resolved
@sabakhshi sabakhshi changed the title Fix bugs and add moment output to moment coefficient component Fixed incorrect surface moment derivatives and added a moment output to the component Dec 13, 2024
@sabakhshi sabakhshi requested a review from kanekosh December 13, 2024 22:22
… derivativesas they have now been resolved. Don't want to confuse people in the future.
@sabakhshi sabakhshi requested a review from kanekosh December 16, 2024 21:31
kanekosh
kanekosh previously approved these changes Dec 17, 2024
Copy link
Collaborator

@eytanadler eytanadler left a comment

Choose a reason for hiding this comment

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

One more very minor comment. Could you also update the patch version for now so that we can track which versions have this fix while we wait on the numpy and openmdao update in #450?

openaerostruct/functionals/moment_coefficient.py Outdated Show resolved Hide resolved
@eytanadler eytanadler merged commit f79f9cc into mdolab:main Dec 18, 2024
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants