Skip to content

Conversation

@ayoubdsp
Copy link

@ayoubdsp ayoubdsp commented Dec 1, 2025

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.md has been updated (if relevant)

Current behavior

Currently, RocketPy only supports attaching a single Motor object to a Rocket. Users wishing to simulate a cluster configuration must manually aggregate thrust curves and mass properties externally before creating a generic motor instance, which is cumbersome and less accurate regarding geometry.

New behavior

This PR introduces the ClusterMotor class in rocketpy/motors/cluster_motor.py.

Key features:

  • Aggregation: The class accepts a list of Motor objects, their positions, and optional orientations.
  • Mass & Thrust: It automatically computes the total propellant mass, dry mass, and total thrust vector (scalar sum for now) as functions of time.
  • Geometry: It computes the global Center of Mass (CoM) and Center of Propellant Mass (CoPM) of the cluster.
  • Tools: I have added the necessary mathematical helper functions (Parallel Axis Theorem for moments and products of inertia) in rocketpy/tools.py to support future advanced inertia calculations.

Breaking change

  • Yes
  • No

Additional information

Note to reviewers regarding Inertia:

I have already implemented the necessary Parallel Axis Theorem functions in rocketpy/tools.py within this PR. The full integration of these tools into ClusterMotor (to calculate the full inertia tensor dynamically) is planned for a dedicated follow-up PR immediately after this one is merged.

This incremental approach ensures the basic structure is validated before adding mathematical complexity.

@ayoubdsp ayoubdsp requested a review from a team as a code owner December 1, 2025 02:56
@Gui-FernandesBR Gui-FernandesBR changed the base branch from master to develop December 3, 2025 22:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

No open projects
Status: Backlog

Development

Successfully merging this pull request may close these issues.

1 participant