@@ -300,6 +300,11 @@ class Function. Thrust units are Newtons.
300
300
positions specified. Options are "nozzle_to_combustion_chamber" and
301
301
"combustion_chamber_to_nozzle". Default is
302
302
"nozzle_to_combustion_chamber".
303
+ only_radial_burn : boolean, optional
304
+ If True, inhibits the grain from burning axially, only computing
305
+ radial burn. Otherwise, if False, allows the grain to also burn
306
+ axially. May be useful for axially inhibited grains or hybrid motors.
307
+ Default is False.
303
308
304
309
Returns
305
310
-------
@@ -316,7 +321,6 @@ class Function. Thrust units are Newtons.
316
321
reshape_thrust_curve = reshape_thrust_curve ,
317
322
interpolation_method = interpolation_method ,
318
323
coordinate_system_orientation = coordinate_system_orientation ,
319
- only_radial_burn = only_radial_burn ,
320
324
)
321
325
# Nozzle parameters
322
326
self .throat_radius = throat_radius
@@ -484,13 +488,7 @@ def geometry_dot(t, y):
484
488
# Compute state vector derivative
485
489
grain_inner_radius , grain_height = y
486
490
if self .only_radial_burn :
487
- burn_area = (
488
- 2
489
- * np .pi
490
- * (
491
- grain_inner_radius * grain_height
492
- )
493
- )
491
+ burn_area = 2 * np .pi * (grain_inner_radius * grain_height )
494
492
else :
495
493
burn_area = (
496
494
2
@@ -516,12 +514,7 @@ def geometry_jacobian(t, y):
516
514
grain_inner_radius , grain_height = y
517
515
if self .only_radial_burn :
518
516
factor = volume_diff / (
519
- 2
520
- * np .pi
521
- * (
522
- grain_inner_radius * grain_height
523
- )
524
- ** 2
517
+ 2 * np .pi * (grain_inner_radius * grain_height ) ** 2
525
518
)
526
519
527
520
inner_radius_derivative_wrt_inner_radius = factor * (
@@ -537,8 +530,6 @@ def geometry_jacobian(t, y):
537
530
inner_radius_derivative_wrt_height ,
538
531
],
539
532
[height_derivative_wrt_inner_radius , height_derivative_wrt_height ],
540
-
541
-
542
533
]
543
534
544
535
else :
@@ -568,10 +559,8 @@ def geometry_jacobian(t, y):
568
559
inner_radius_derivative_wrt_height ,
569
560
],
570
561
[height_derivative_wrt_inner_radius , height_derivative_wrt_height ],
571
-
572
-
573
562
]
574
-
563
+
575
564
def terminate_burn (t , y ): # pylint: disable=unused-argument
576
565
end_function = (self .grain_outer_radius - y [0 ]) * y [1 ]
577
566
return end_function
@@ -625,9 +614,7 @@ def burn_area(self):
625
614
burn_area = (
626
615
2
627
616
* np .pi
628
- * (
629
- self .grain_inner_radius * self .grain_height
630
- )
617
+ * (self .grain_inner_radius * self .grain_height )
631
618
* self .grain_number
632
619
)
633
620
else :
@@ -812,6 +799,7 @@ def to_dict(self, include_outputs=False):
812
799
"grain_initial_height" : self .grain_initial_height ,
813
800
"grain_separation" : self .grain_separation ,
814
801
"grains_center_of_mass_position" : self .grains_center_of_mass_position ,
802
+ "only_radial_burn" : self .only_radial_burn ,
815
803
}
816
804
)
817
805
@@ -855,4 +843,5 @@ def from_dict(cls, data):
855
843
throat_radius = data ["throat_radius" ],
856
844
interpolation_method = data ["interpolate" ],
857
845
coordinate_system_orientation = data ["coordinate_system_orientation" ],
846
+ only_radial_burn = data .get ("only_radial_burn" , False ),
858
847
)
0 commit comments