FIX: compute LiquidMotor.propellant_I_33 from tank geometry (fixes #1191) - #1192
Closed
zjk199506 wants to merge 1 commit into
Closed
FIX: compute LiquidMotor.propellant_I_33 from tank geometry (fixes #1191)#1192zjk199506 wants to merge 1 commit into
zjk199506 wants to merge 1 commit into
Conversation
propellant_I_33 was hard-coded to return 0, silently dropping the propellant roll inertia from the 6-DOF dynamics. Compute it per positioned tank as the roll inertia of the liquid and gas columns: I_33 = rho/2 * int(area * r^2) dh from the tank bottom up to the fluid surface height. No parallel-axis term is needed (roll-axis component is invariant under axial translation). Also expose public liquid_density / gas_density properties on Tank, previously only available as private attributes. Fixes #1191
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.
Summary
Fixes #1191.
LiquidMotor.propellant_I_33was hard-coded toreturn 0, silently dropping the propellant roll inertia from the 6-DOF dynamics. Vehicle-scale tanks carry 10^2-10^4 kgm^2 of roll inertia (e.g. a 3267 kg LOX column in a r=0.7 m cylinder carries 1/2 m r^2 ~= 800 kgm^2), so roll-channel analyses (roll control sizing, roll resonance, spin dynamics) were off by the full propellant contribution.Implementation
For each positioned tank, the roll inertia of the liquid and gas columns is integrated from the tank geometry, mirroring the existing
liquid_inertia/gas_inertiapatterns:No parallel-axis term is required: the roll-axis component is invariant under axial translation.
This also exposes public
liquid_density/gas_densityproperties onTank(previously only available as private attributes), whichLiquidMotornow uses.Validation
Closed-form cross-check on a draining cylindrical tank (r=0.7 m, h=2.0 m, LOX 1141 kg/m^3, 93% fill, constant outflow to half drain):
propellant_I_33The cylinder closed form 1/2 m r^2 holds for both the liquid and the gas column, and the implementation matches it to all displayed digits (regression test pins both anchors, plus monotonic decrease while draining).
A companion notebook with the evidence chain (including a two-tank vehicle case: 1045.77 kg*m^2 at t=0) is linked in #1191.
Testing
test_propellant_I_33_cylindrical_closed_form,test_propellant_I_33_empty_tank_is_zero(also covers the new density properties)tests/unit/motors+tests/integration/motors: 122 passedtests/unitsuite: 2164 passed, 7 failed / 11 skipped - the 7 failures (test_sensitivity,environment_analysis) reproduce on a clean develop checkout and are caused by optional dependencies (e.g. SALib) missing from my local env, unrelated to this changeblackclean on all touched files