Skip to content

Commit

Permalink
ENH: add structural to total mass ratio for motor and rocket
Browse files Browse the repository at this point in the history
  • Loading branch information
Lucas-Prates committed Oct 17, 2024
1 parent 8e4db26 commit 3bfa766
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions rocketpy/prints/rocket_prints.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ def inertia_details(self):
print(f"Rocket Mass: {self.rocket.mass:.3f} kg (without motor)")
print(f"Rocket Dry Mass: {self.rocket.dry_mass:.3f} kg (with unloaded motor)")
print(f"Rocket Loaded Mass: {self.rocket.total_mass(0):.3f} kg")
mass_ratio = self.rocket.dry_mass / self.rocket.total_mass(0)
print(f"Rocket Structural to total mass ratio: {mass_ratio:.3f}")
print(
f"Rocket Inertia (with unloaded motor) 11: {self.rocket.dry_I_11:.3f} kg*m2"
)
Expand Down
2 changes: 2 additions & 0 deletions rocketpy/prints/solid_motor_prints.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ def motor_details(self):
print(
f"Total Propellant Mass: {self.solid_motor.propellant_initial_mass:.3f} kg"
)
mass_ratio = self.solid_motor.dry_mass / self.solid_motor.total_mass(0)
print(f"Structural to total mass ratio: {mass_ratio:.3f}")
average = self.solid_motor.exhaust_velocity.average(*self.solid_motor.burn_time)
print(f"Average Propellant Exhaust Velocity: {average:.3f} m/s")
print(f"Average Thrust: {self.solid_motor.average_thrust:.3f} N")
Expand Down

0 comments on commit 3bfa766

Please sign in to comment.