Skip to content

[FEATURE] Add structural aeroelasticity#156

Open
JonahJ27 wants to merge 44 commits intocamUrban:mainfrom
JonahJ27:feature/aeroelasticity-ptera-merge
Open

[FEATURE] Add structural aeroelasticity#156
JonahJ27 wants to merge 44 commits intocamUrban:mainfrom
JonahJ27:feature/aeroelasticity-ptera-merge

Conversation

@JonahJ27
Copy link
Copy Markdown
Contributor

@JonahJ27 JonahJ27 commented Mar 24, 2026

Description

This will add a basic model for aeroelastic deformation to Ptera. More developer level changes will include the introduction of coupled unsteady problems and the coupled unsteady solver both of which are subclasses of their uncoupled counterparts as well as single step movement classes.

Motivation

It is generally difficult to simulate and thus develop optimal wings for flapping wing robotic systems. Assumptions that your wings are completely rigid would allow for Ptera to aid in that development, however wings deform in ways that are quite impactful on the lift and drag they produce. Simulating this with increased accuracy will allow for better modeling of performance and a better feedback loop for design optimization.

Relevant Issues

Closes partially Issue #28
Will likely make changes that impact #65

Changes

  • New problem types
  • A new solver
  • New examples
  • Single step movement

Dependency Updates

matplotlib is required

Change Magnitude

Major

Checklist (check each item when completed or not applicable)

  • I am familiar with the current contribution guidelines.
  • PR description links all relevant issues and follows this template.
  • My branch is based on main and is up to date with the upstream main branch.
  • All calculations use S.I. units.
  • Code is formatted with black (line length = 88).
  • Code is well documented with block comments where appropriate.
  • Any external code, algorithms, or equations used have been cited in comments or docstrings.
  • All new modules, classes, functions, and methods have docstrings in reStructuredText format, and are formatted using docformatter (--in-place --black). See the style guide for type hints and docstrings for more details.
  • All new classes, functions, and methods in the pterasoftware package use type hints. See the style guide for type hints and docstrings for more details.
  • If any major functionality was added or significantly changed, I have added or updated tests in the tests package.
  • Code locally passes all tests in the tests package.
  • This PR passes the ReadTheDocs build check (this runs automatically with the other workflows).
  • This PR passes the black, codespell, and isort GitHub actions.
  • This PR passes the mypy GitHub action.
  • This PR passes all the tests GitHub actions.

TODO

  • Fix timer
  • Docstrings need a rigorous look
  • Removal of some examples, clean up the rest significantly
  • Discuss run breakouts
  • Black reformat
  • Ensure tests pass as expected
  • Investigate wing explosion twist
  • Remove demos folder (the demos folder contains some unfinished and hacky examples that are good for development testing and edge cases, but not designed for public understanding). The coupled_unsteady_first_order_deformation example is where the public facing info should go
  • Add testing

@camUrban camUrban added the feature New feature or request label Mar 24, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 24, 2026

Codecov Report

❌ Patch coverage is 9.70464% with 428 lines in your changes missing coverage. Please review.
✅ Project coverage is 86.40%. Comparing base (09266c0) to head (d0e6f4f).

Files with missing lines Patch % Lines
...are/coupled_unsteady_ring_vortex_lattice_method.py 0.00% 173 Missing ⚠️
pterasoftware/problems.py 12.18% 173 Missing ⚠️
...aeroelastic_unsteady_ring_vortex_lattice_method.py 0.00% 56 Missing ⚠️
pterasoftware/geometry/wing.py 21.73% 18 Missing ⚠️
...free_flight_unsteady_ring_vortex_lattice_method.py 0.00% 8 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #156      +/-   ##
==========================================
- Coverage   91.72%   86.40%   -5.32%     
==========================================
  Files          35       38       +3     
  Lines        6837     7310     +473     
==========================================
+ Hits         6271     6316      +45     
- Misses        566      994     +428     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@camUrban camUrban changed the title Feature/aeroelasticity ptera merge [FEATURE] Add structural aeroelasticity Mar 25, 2026
@camUrban
Copy link
Copy Markdown
Owner

camUrban commented Mar 25, 2026

Hey @JonahJ27. Super excited about this PR! I'm still working on my preliminary comments. In the mean time, one small thing to make your life easier is running pre-commit install inside your virtual environment. This command will add Git hooks that check and reformat files using isort, black, docformatter, and codespell. You may need to run pip install -r requirements_dev.txt beforehand if you haven't already.

Note that the Git hooks "fail" and stop the commit if the checks find any files to reformat. You can either just stage and commit the reformatted files again, which usually works, or always run pre-commit run --all-files before you commit.

@JonahJ27
Copy link
Copy Markdown
Contributor Author

Hey @JonahJ27. Super excited about this PR! I'm still working on my preliminary comments. In the mean time, one small thing to make your life easier is running pre-commit install inside your virtual environment. This command will add Git hooks that check and reformat files using isort, black, docformatter, and codespell. You may need to run pip install -r requirements_dev.txt beforehand if you haven't already.

Note that the Git hooks "fail" and stop the commit if the checks find any files to reformat. You can either just run the commit again with the reformatted files, which usually works, or always run pre-commit run --all-files before you commit.

Fixed now

@camUrban camUrban mentioned this pull request Mar 27, 2026
55 tasks
@JonahJ27 JonahJ27 marked this pull request as ready for review April 21, 2026 15:07
@JonahJ27 JonahJ27 requested a review from camUrban as a code owner April 21, 2026 15:07
@camUrban camUrban mentioned this pull request Apr 21, 2026
15 tasks
@camUrban
Copy link
Copy Markdown
Owner

Hey @JonahJ27! I extracted the coupled layer logic from this PR and merged it in #163. There are a few small structural changes I made (described in the PRD) but they should all resolve cleanly (suggested resolutions also listed). Thanks so much for your work on that by the way. I added you as a co-author to those commits. Let me know once you've rebased or otherwise incorporated them and I'll continue with the review!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants