Skip to content

[FEATURE] Add named wind axes force properties and unify sign rules - #280

Open
BorniaPedro wants to merge 4 commits into
camUrban:mainfrom
BorniaPedro:issue-262-refactor-named-load
Open

[FEATURE] Add named wind axes force properties and unify sign rules#280
BorniaPedro wants to merge 4 commits into
camUrban:mainfrom
BorniaPedro:issue-262-refactor-named-load

Conversation

@BorniaPedro

Copy link
Copy Markdown
Contributor

Description

Adds named wind axes force and force coefficient read-only properties to Airplane and Panel, centralizes the scalar types vocabulary in _output_rendering, replaces manual component negations across the output modules, and documents named wind axes force definitions in docs/AXES_POINTS_AND_FRAMES.md.

Motivation

Physical load quantities like induced drag and lift were previously re-derived at multiple sites across the output modules by manually negating raw wind axes x and z vector components. Centralizing these physical quantities into named properties on Airplane and Panel places load knowledge with the load classes, avoids repeated sign negation rules, and establishes a single canonical source for the scalar type vocabulary across visualization functions.

Relevant Issues

Closes #262 .

Changes

  • Added public read-only properties (induced_drag_W, side_force_W, lift_W, induced_drag_coefficient_W, side_force_coefficient_W, and lift_coefficient_W) to Airplane.
  • Added read-only properties (induced_drag_W, side_force_W, and lift_W) to Panel using existing slots.
  • Centralized the VALID_SCALAR_TYPES vocabulary in _output_rendering.py and refactored get_scalars to query named panel properties.
  • Updated scalar type validation in draw and animate, along with data assembly in plot_results_versus_time, to reference the centralized constants and named properties.
  • Documented named wind axes force components and their sign conventions in docs/AXES_POINTS_AND_FRAMES.md.

Dependency Updates

None.

Change Magnitude

Minor: Small change such as a bug fix, small enhancement, or documentation update.

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 ascii-only, pre-commit-hooks, and zizmor GitHub actions.
  • This PR passes the lint job of the CI GitHub action.
  • This PR passes the test jobs of the CI GitHub action.

@BorniaPedro
BorniaPedro requested a review from camUrban as a code owner August 23, 2026 18:01
Copilot AI balanced review requested due to automatic review settings August 23, 2026 18:01

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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@codecov

codecov Bot commented Aug 23, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 82.81250% with 11 lines in your changes missing coverage. Please review.
✅ Project coverage is 94.44%. Comparing base (ae76bdb) to head (4aca08b).

Files with missing lines Patch % Lines
pterasoftware/geometry/airplane.py 80.00% 6 Missing ⚠️
pterasoftware/_panel.py 80.00% 3 Missing ⚠️
pterasoftware/output.py 80.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #280      +/-   ##
==========================================
- Coverage   94.53%   94.44%   -0.09%     
==========================================
  Files          47       47              
  Lines        9209     9260      +51     
==========================================
+ Hits         8706     8746      +40     
- Misses        503      514      +11     

☔ View full report in Codecov by Harness.
📢 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.

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.

[FEATURE] Add named load quantities to Airplane and Panel

2 participants