ENH: estimate parachute opening shock force (#161)#1072
Open
wuisabel-gif wants to merge 2 commits into
Open
Conversation
wuisabel-gif
added a commit
to wuisabel-gif/RocketPy
that referenced
this pull request
Jul 19, 2026
4 tasks
wuisabel-gif
force-pushed
the
enh/parachute-opening-shock-force
branch
from
July 19, 2026 04:20
83a991a to
9004d00
Compare
Member
|
duplicated #1050 |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #1072 +/- ##
========================================
Coverage 82.18% 82.18%
========================================
Files 122 122
Lines 16355 16361 +6
========================================
+ Hits 13441 13447 +6
Misses 2914 2914 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull request type
Checklist
ruff checkandruff format --check; pylint 10/10 on the touched files)test_parachute.py,test_stochastic_parachute.py,test_parachute_triggers.py— 20 passing); relying on CI for the full slow suiteCHANGELOG.mdupdatedCurrent behavior
Parachutemodels drag (cd_s) and trigger conditions but has no estimate of the opening shock force — the peak transient inflation load on the recovery harness. Users can't size shock cords/bulkheads from a simulation, and the peak load is typically several times the steady-state drag. This is #161.New behavior
Adds the standard Knacke approximation (Parachute Recovery Systems Design Manual, §5.5) as an opt-in estimate:
opening_shock_coefficient(Cx) onParachute(lumps the opening-force coefficient and the infinite-mass factorX1, per the issue). Defaults toNone, so behavior is unchanged unless set.Parachute.evaluate_opening_shock_force(air_density, velocity)→Cx · q · cd_swithq = 0.5·ρ·v². Raises if the coefficient wasn't set.to_dict/from_dict.Unit tests cover the formula, that it exceeds steady drag,
v²scaling, the disabled-by-default guard, and dict round-trip.Breaking change
opening_shock_coefficientdefaults toNone(feature off); nothing changes for existing code.Additional information
This PR intentionally scopes to the
Parachute-level estimate. The issue also asks for automatic capture duringFlight(criterion 3), which involves a couple of design choices I'd like your input on before wiring:Parachuteobject is unsafe for Monte Carlo reuse; I'd suggest storing onFlight(e.g. a{parachute_name: force}mapping or extendingparachute_events). (Note the issue'sflight.parachutes[0].opening_shock_forceexample can't work as-is, since deployed parachutes are removed fromflight.parachutes.)lag(line-stretch), since the rocket is in free-fall during the lag.Happy to add the
Flightintegration in this PR or a follow-up once you confirm the preferred approach.Addresses #161