test_spacecraftVariableMassRates
- test_spacecraftVariableMassRates.test_centerOfMassPrimeMassRateScaling()[source]
Test the complete reported first-moment quotient rule.
Let the spacecraft first mass moment and center of mass be
\[\mathbf{q}_B = \sum_i m_i\mathbf{r}_{iB}, \qquad \mathbf{c}_B = \frac{\mathbf{q}_B}{M}.\]Their body-frame derivatives must satisfy
\[\mathbf{c}'_B = \frac{\mathbf{q}'_B}{M} - \frac{\dot{M}}{M}\mathbf{c}_B.\]For the fixed hub and stationary offset tank used here, \(\mathbf{q}'_B=\dot m_T\mathbf r_{T/B}\). The first term moves the center of mass toward the hub as the tank drains. The second is the denominator contribution and contains one division by total mass.
- test_spacecraftVariableMassRates.test_mixedUpdateOnlyPreservesLegacyRateDynamics()[source]
Verify update-only depletion does not alter another tank’s dynamics.
The first tank uses the legacy coupled-depletion model. The second tank is either a nondepleting control or an update-only depleting tank. Because update-only depletion changes reported retained mass-property derivatives but not the rate terms used by the equations of motion, both cases must produce the same hub accelerations. Absolute acceleration values also pin the established coupled-depletion equations independently of that comparison.
- test_spacecraftVariableMassRates.test_updateOnlyExcludesDepletionRateTerms()[source]
Verify update-only depletion reports derivatives without altering motion.
FuelTank.setUpdateOnly(True)updates and reports the retained mass properties while omitting depletion-dependent rate terms from the equations of motion. A stationary leaking tank must therefore report its mass and center-of-mass derivatives while leaving the force-free hub acceleration equal to zero.
- test_spacecraftVariableMassRates.test_updateOnlyTankDerivativesMatchFiniteDifference()[source]
Compare retained tank derivatives with integrated mass properties.
An emptying tank has a moving retained center of mass and a changing inertia. In update-only mode these derivatives must still be reported, even though their rate-dependent loads are omitted from the equations of motion.