11import numpy as np
22
3+ from .motor_prints import _MotorPrints
34
4- class _HybridMotorPrints :
5+
6+ class _HybridMotorPrints (_MotorPrints ):
57 """Class that holds prints methods for HybridMotor class.
68
79 Attributes
@@ -26,6 +28,7 @@ def __init__(
2628 -------
2729 None
2830 """
31+ super ().__init__ (hybrid_motor )
2932 self .hybrid_motor = hybrid_motor
3033
3134 def nozzle_details (self ):
@@ -63,28 +66,6 @@ def grain_details(self):
6366 print (f"Grain Volume: { self .hybrid_motor .solid .grain_initial_volume :.3f} m3" )
6467 print (f"Grain Mass: { self .hybrid_motor .solid .grain_initial_mass :.3f} kg\n " )
6568
66- def motor_details (self ):
67- """Prints out all data available about the HybridMotor.
68-
69- Returns
70- -------
71- None
72- """
73- print ("Motor Details" )
74- print (f"Total Burning Time: { self .hybrid_motor .burn_duration } s" )
75- print (
76- f"Total Propellant Mass: { self .hybrid_motor .propellant_initial_mass :.3f} kg"
77- )
78- print (f"Structural Mass Ratio: { self .hybrid_motor .structural_mass_ratio :.3f} " )
79- avg = self .hybrid_motor .exhaust_velocity .average (* self .hybrid_motor .burn_time )
80- print (f"Average Propellant Exhaust Velocity: { avg :.3f} m/s" )
81- print (f"Average Thrust: { self .hybrid_motor .average_thrust :.3f} N" )
82- print (
83- f"Maximum Thrust: { self .hybrid_motor .max_thrust } N at "
84- f"{ self .hybrid_motor .max_thrust_time } s after ignition."
85- )
86- print (f"Total Impulse: { self .hybrid_motor .total_impulse :.3f} Ns\n " )
87-
8869 def all (self ):
8970 """Prints out all data available about the HybridMotor.
9071
0 commit comments