ENH: model unbonded solid-motor grain CM shift (#340) - #1138
Gui-FernandesBR merged 3 commits into
Conversation
|
I don't believe the solution could be that simple... But we can give it a try |
Blank line before evaluate_geometry, wrap the propellant_I_11 assignment that ran past 88 columns, and let the expected_cm expression in the test break the way the formatter wants. No behaviour change. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #1138 +/- ##
===========================================
+ Coverage 82.18% 84.34% +2.15%
===========================================
Files 122 130 +8
Lines 16355 17268 +913
===========================================
+ Hits 13441 14564 +1123
+ Misses 2914 2704 -210 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
Following up on my "I don't believe the solution could be that simple" comment — I worked through it and it does hold up. Recording the check so it is on the record: The CM expression is exactly derivable. With grains packed against the fixed aft face and instantaneous pitch which is precisely the implemented The default path is unchanged. For The remaining caveats are modelling choices rather than errors, and the docstring already states them: |
Summary
SolidMotor(grains_bonded=True)(default preserves current fixed-grain / BATES behavior).grains_bonded=False, applies a first-order inertial packing model: grains pack against the aft (nozzle-side) face of the initial grain stack, so propellant CM shifts toward the nozzle asgrain_heightregresses:CM(t) = grains_center_of_mass_position - _csys * (n/2) * (h0 - h(t)). Parallel-axispropellant_I_11uses the packed pitch.grain_separation(spacers) is retained; only grain-height loss shortens the stack. Withonly_radial_burn=True, height is fixed so CM does not shift.Fixes #340
Follow-ups (out of scope)
grain_separation → 0when packing)Test plan
PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 pytest tests/unit/motors/test_solidmotor.pygrains_bondedround-trips throughto_dict/from_dict