File tree Expand file tree Collapse file tree 3 files changed +12
-14
lines changed Expand file tree Collapse file tree 3 files changed +12
-14
lines changed Original file line number Diff line number Diff line change 1
- from ..mathutils .function import funcify_method , reset_funcified_methods
1
+ from ..mathutils .function import Function , funcify_method , reset_funcified_methods
2
2
from ..plots .hybrid_motor_plots import _HybridMotorPlots
3
3
from ..prints .hybrid_motor_prints import _HybridMotorPrints
4
4
from .liquid_motor import LiquidMotor
@@ -372,7 +372,9 @@ def exhaust_velocity(self):
372
372
self.exhaust_velocity : Function
373
373
Gas exhaust velocity of the motor.
374
374
"""
375
- return self .total_impulse / self .propellant_initial_mass
375
+ return Function (
376
+ self .total_impulse / self .propellant_initial_mass
377
+ ).set_discrete_based_on_model (self .thrust )
376
378
377
379
@funcify_method ("Time (s)" , "Mass (kg)" )
378
380
def propellant_mass (self ):
Original file line number Diff line number Diff line change @@ -450,11 +450,7 @@ def total_mass_flow_rate(self):
450
450
rate should not be greater than `total_mass_flow_rate`, otherwise the
451
451
grains mass flow rate will be negative, losing physical meaning.
452
452
"""
453
- return (
454
- - 1
455
- * self .thrust
456
- / self .exhaust_velocity .set_discrete_based_on_model (self .thrust )
457
- )
453
+ return - 1 * self .thrust / self .exhaust_velocity
458
454
459
455
@property
460
456
@abstractmethod
@@ -1228,19 +1224,17 @@ def exhaust_velocity(self):
1228
1224
self.exhaust_velocity : Function
1229
1225
Gas exhaust velocity of the motor.
1230
1226
"""
1231
- return self .total_impulse / self .propellant_initial_mass
1227
+ return Function (
1228
+ self .total_impulse / self .propellant_initial_mass
1229
+ ).set_discrete_based_on_model (self .thrust )
1232
1230
1233
1231
@funcify_method ("Time (s)" , "Mass Flow Rate (kg/s)" )
1234
1232
def mass_flow_rate (self ):
1235
1233
"""Time derivative of propellant mass. Assumes constant exhaust
1236
1234
velocity. The formula used is the opposite of thrust divided by
1237
1235
exhaust velocity.
1238
1236
"""
1239
- return (
1240
- - 1
1241
- * self .thrust
1242
- / self .exhaust_velocity .set_discrete_based_on_model (self .thrust )
1243
- )
1237
+ return - 1 * self .thrust / self .exhaust_velocity
1244
1238
1245
1239
@funcify_method ("Time (s)" , "center of mass (m)" )
1246
1240
def center_of_propellant_mass (self ):
Original file line number Diff line number Diff line change @@ -381,7 +381,9 @@ def exhaust_velocity(self):
381
381
self.exhaust_velocity : Function
382
382
Gas exhaust velocity of the motor.
383
383
"""
384
- return self .total_impulse / self .propellant_initial_mass
384
+ return Function (
385
+ self .total_impulse / self .propellant_initial_mass
386
+ ).set_discrete_based_on_model (self .thrust )
385
387
386
388
@property
387
389
def propellant_initial_mass (self ):
You can’t perform that action at this time.
0 commit comments