Skip to content
Open
Changes from 1 commit
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix: scale thrust source before Motor init
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
  • Loading branch information
ayoubdsp and Copilot authored Mar 16, 2026
commit 3a57b9c45019c1e12a41b2353791e7bcc1973525
8 changes: 6 additions & 2 deletions rocketpy/motors/cluster_motor.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,13 @@ def __init__(self, motor, number, radius):
self.radius = radius
dry_inertia_cluster = self._calculate_dry_inertia()

# Use a thrust source scaled by the number of motors so that
# all thrust-derived quantities computed by the base Motor class
# correspond to the full cluster rather than a single motor.
scaled_thrust_source = motor.thrust * number

super().__init__(
thrust_source=motor.thrust_source,
thrust_source=scaled_thrust_source,
nozzle_radius=motor.nozzle_radius,
burn_time=motor.burn_time,
dry_mass=motor.dry_mass * number,
Expand All @@ -57,7 +62,6 @@ def __init__(self, motor, number, radius):
self.grain_initial_inner_radius = motor.grain_initial_inner_radius
self.grain_initial_height = motor.grain_initial_height
self.grains_center_of_mass_position = motor.grains_center_of_mass_position
self._thrust = self.motor.thrust * self.number
self._propellant_mass = self.motor.propellant_mass * self.number
self._propellant_initial_mass = self.number * self.motor.propellant_initial_mass
self._center_of_propellant_mass = self.motor.center_of_propellant_mass
Expand Down