ENH: Add tube-fin aerodynamic surface - #1144
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #1144 +/- ##
===========================================
+ Coverage 82.18% 83.28% +1.10%
===========================================
Files 122 130 +8
Lines 16355 17072 +717
===========================================
+ Hits 13441 14219 +778
+ Misses 2914 2853 -61 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Gui-FernandesBR
left a comment
There was a problem hiding this comment.
The implementation is clean and solid.
Only thing which concerns me is related to the validation. Could you run some tests comparing your implementation against openrocket, just to make sure we are calculating similar results?
|
Thank you for the review, @Gui-FernandesBR. I ran a source-anchored numerical cross-check against OpenRocket's tube-fin implementation. Revisions tested
MethodI evaluated the Ribner normal-force equation from OpenRocket's The comparison covered:
OpenRocket computes the coefficient from the single-tube expression, with the aerodynamic aggregation accounting for the number of tubes. RocketPy computes the equivalent set-level value directly by multiplying by the tube count. All cases used mutually tangent tubes. The reference area was Results
The 10° normal-force values also matched. At 30°, RocketPy produced the same values obtained by applying OpenRocket's 20° stall cap. The assertions used an absolute tolerance of Environment
Scope and limitationThis was a source-level numerical comparison against a fixed OpenRocket commit, not a black-box execution of the OpenRocket application. OpenRocket itself was not executed because the validation environment did not have a Java runtime. The comparison is limited to the scope implemented in this PR: subsonic normal force and the quarter-chord CP for Mach ≤ 0.5. OpenRocket's transonic and supersonic CP model, roll behavior, friction drag, and pressure drag are intentionally outside this initial implementation. Within that scope, RocketPy and the referenced OpenRocket implementation produced matching results for every tested case. |
Closes #816.
Pull request type
Checklist
statsmodelsdependency, which is not installed in the local test environmentCHANGELOG.md— no action needed; an LLM workflow auto-updates it after mergeCurrent behavior
RocketPy has no built-in aerodynamic model for tube fins. Users must supply custom coefficients through
GenericSurface, which requires external aerodynamic data and does not expose tube-fin geometry directly.New behavior
This PR adds a
TubeFinsaerodynamic surface andRocket.add_tube_fins. The first implementation follows the Ribner ring-airfoil normal-force slope used by OpenRocket and includes:The model intentionally does not calculate Mach-dependent center of pressure above Mach 0.5, tube friction or pressure drag, cant and roll behavior, side force and yaw, or separated and overlapping tube layouts. Tube-fin drag must remain included in the rocket's power-on and power-off drag curves.
Validation
18 passedin the focusedTubeFinstests.200 passed, 7 skippedacross aerodynamic-surface, Rocket, and encoding tests.2170 passed, 59 skippedin the complete test suite; four sensitivity tests failed because the optionalstatsmodelsdependency is not installed.10.00/10.Breaking change