Skip to content

ENH: Refactor Aero Surface, Make GenericSurface the Mother Class#1064

Draft
MateusStano wants to merge 12 commits into
enh/eventsfrom
enh/aero-refactor
Draft

ENH: Refactor Aero Surface, Make GenericSurface the Mother Class#1064
MateusStano wants to merge 12 commits into
enh/eventsfrom
enh/aero-refactor

Conversation

@MateusStano

Copy link
Copy Markdown
Member

TBD

MateusStano and others added 8 commits June 22, 2026 21:55
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Every aerodynamic surface is now rooted in GenericSurface and stores its
force coefficients in the body frame (cN/cY/cA) plus the cm/cn/cl moments,
exposing all nine coefficients (cL/cD/cQ/cN/cY/cA/cm/cn/cl) with the wind
trio lazily derived. A force_convention argument lets users supply wind- or
body-frame coefficients. Barrowman surfaces (nose, tail, fin sets) keep the
classic geometric normal-force/moment method, report the force at the
geometric center of pressure via the classic 180-degree surface rotation,
and expose cN_alpha/cY_beta stability slopes (the old clalpha relabelled).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Replace the poorly defined calisto_linear_generic fixture, which kept the
Barrowman nose cone and tail and swapped only the fins for a
LinearGenericSurface with arbitrary made-up coefficients. The new fixture is a
standalone Calisto whose nose cone, tail and fins are all LinearGenericSurfaces
built from coefficient curves extracted off the standard Barrowman surfaces
(normal-force-curve slope, center of pressure, fin roll damping).

Each linear surface applies its force at its own origin and is placed at the
source surface's center-of-pressure station, so both the static-margin path and
the flight-moment path land at the same point as calisto_robust. The resulting
flight matches the standard Calisto (identical apogee, out-of-rail time and
ascent angle of attack), so the fixture now exercises the linear
generic-surface path against a known-good reference.

Also fix test_linear_generic_surface_flight_is_stable to check the angle of
attack only during the ascent off the rail: on the rail the freestream speed is
~0 and the angle of attack is reported as a degenerate 90 degrees for any
launcher, which previously failed the < 45 assertion.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@MateusStano
MateusStano changed the base branch from master to enh/events July 11, 2026 13:12
@MateusStano MateusStano self-assigned this Jul 11, 2026
@codecov

codecov Bot commented Jul 25, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 93.82979% with 87 lines in your changes missing coverage. Please review.
⚠️ Please upload report for BASE (enh/events@5fff32c). Learn more about missing BASE report.

Files with missing lines Patch % Lines
rocketpy/rocket/aero_surface/aero_coefficient.py 93.68% 12 Missing ⚠️
rocketpy/prints/aero_surface_prints.py 77.55% 11 Missing ⚠️
rocketpy/rocket/rocket.py 95.26% 10 Missing ⚠️
rocketpy/plots/aero_surface_plots.py 85.45% 8 Missing ⚠️
rocketpy/plots/flight_plots.py 90.69% 8 Missing ⚠️
rocketpy/rocket/aero_surface/generic_surface.py 95.58% 8 Missing ⚠️
rocketpy/plots/rocket_plots.py 87.50% 7 Missing ⚠️
rocketpy/prints/rocket_prints.py 64.28% 5 Missing ⚠️
rocketpy/simulation/helpers/flight_derivatives.py 79.16% 5 Missing ⚠️
rocketpy/prints/flight_prints.py 89.18% 4 Missing ⚠️
... and 4 more
Additional details and impacted files
@@              Coverage Diff              @@
##             enh/events    #1064   +/-   ##
=============================================
  Coverage              ?   81.88%           
=============================================
  Files                 ?      129           
  Lines                 ?    16880           
  Branches              ?        0           
=============================================
  Hits                  ?    13822           
  Misses                ?     3058           
  Partials              ?        0           

☔ 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.

1 participant