-
Notifications
You must be signed in to change notification settings - Fork 63
New thickness to chord constraint implementation #280
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
base: main
Are you sure you want to change the base?
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #280 +/- ##
==========================================
+ Coverage 67.10% 69.02% +1.92%
==========================================
Files 48 48
Lines 12378 12492 +114
==========================================
+ Hits 8306 8623 +317
+ Misses 4072 3869 -203 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.
Pull Request Overview
This PR adds a new implementation of thickness-to-chord constraints in DVConstraints, providing more accurate chord length computations and 2D grid support. The new implementation uses separate thickness constraints for measuring thickness and chord lengths based on leading/trailing edge points.
- Replaces the previous thickness-to-chord constraint implementation with a more accurate one that computes actual chord lengths
- Adds support for 2D thickness-to-chord constraints with optional section maximum values using KS aggregation
- Updates existing constraint methods to return constraint objects and improves surface projection utilities
Reviewed Changes
Copilot reviewed 6 out of 7 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/reg_tests/test_DVConstraints.py | Expands tests to cover new 1D/2D thickness-to-chord constraint variants and adds writeTecplot testing |
| pygeo/mphys/mphys_dvgeo.py | Adds wrapper methods for new thickness-to-chord constraint functions |
| pygeo/geo_utils/ffd_generation.py | Updates method name from _generateIntersections to _generateGridIntersections |
| pygeo/constraints/thicknessConstraint.py | Complete rewrite of ThicknessToChordConstraint class with new architecture |
| pygeo/constraints/baseConstraint.py | Adds documentation to GeometricConstraint.init method |
| pygeo/constraints/DVCon.py | Major refactoring with new constraint methods, improved surface projection, and return values |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
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.
Pull Request Overview
Copilot reviewed 6 out of 7 changed files in this pull request and generated 2 comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Co-authored-by: Copilot <[email protected]>
Purpose
The current thickness to chord constraint implementations has a few limitations:
This PR adds a completely new implementation of t/c constraints in DVConstraints. The new implementation basically uses two sets of thickness constraints, one to compute the thicknesses and another to compute the chord lengths.
This new implementation has the following advantages:
Technically these changes are backward incompatible because defining the 1D thickness to chord constraints now requires a set of leading and trailing edge coordinates instead of a projection direction and a chord direction. I don't think this is a big issue because these constraints weren't used by many people.
Expected time until merged
Type of change
Testing
I've expanded the existing thickness to chord constraint test to test the new capabilities (2D, section max)
Checklist
ruff checkandruff formatto make sure the Python code adheres to PEP-8 and is consistently formattedfprettifyor C/C++ code withclang-formatas applicable