ENH: add animations for motor propellant mass and tank fluid volumes by Bizo883 · Pull Request #894 · RocketPy-Team/RocketPy
Pull request type
- Code changes (bugfix, features)
- Code maintenance (refactoring, formatting, tests)
- ReadMe, Docs and GitHub updates
- Other (please describe):
Checklist
- Tests for the changes have been added (if needed)
- Docs have been reviewed and added / updated
- Lint (
black rocketpy/ tests/) has passed locally - All tests (
pytest tests -m slow --runslow) have passed locally -
CHANGELOG.mdhas been updated (if relevant)
Current behavior
Currently provides only static plots for motor propellant mass and tank fluid volumes.
New behavior
This PR introduces new animation features for motors and tanks:
--Motor animations
A new method animate_propellant_mass() creates an animation of propellant mass decreasing over time.
--Tank animations
A new method animate_fluid_volume() animates liquid volume and gas volume evolution simultaneously.
--Animation saving helper
Added show_or_save_animation() in plot_helpers.py, providing a interface for saving or displaying animations.
--Unit tests
Added test_show_or_save_animation ensuring correct behavior for .gif output and error handling of unsupported formats.
Breaking change
- Yes
- No
Additional information
Enter text here...