Skip to content

Commit 3287138

Browse files
committed
Only radial burning enabled on hybrid class #801
The "only_radial_burning" parameter was added and set as default on the hybrid class. Also, the description of the new parameter was updated and 2 coments about derivatives set to zero were added.
1 parent 7a4267a commit 3287138

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

rocketpy/motors/hybrid_motor.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,7 @@ def __init__( # pylint: disable=too-many-arguments
203203
reshape_thrust_curve=False,
204204
interpolation_method="linear",
205205
coordinate_system_orientation="nozzle_to_combustion_chamber",
206+
only_radial_burn=True,
206207
):
207208
"""Initialize Motor class, process thrust curve and geometrical
208209
parameters and store results.
@@ -346,6 +347,7 @@ class Function. Thrust units are Newtons.
346347
reshape_thrust_curve,
347348
interpolation_method,
348349
coordinate_system_orientation,
350+
only_radial_burn,
349351
)
350352

351353
self.positioned_tanks = self.liquid.positioned_tanks

rocketpy/motors/solid_motor.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@ class Function. Thrust units are Newtons.
302302
"nozzle_to_combustion_chamber".
303303
only_radial_burn : boolean, optional
304304
If True, inhibits the grain from burning axially, only computing
305-
radial burn. Otherwise, if False, allows the grain to also burn
305+
radial burn. If False, allows the grain to also burn
306306
axially. May be useful for axially inhibited grains or hybrid motors.
307307
Default is False.
308308
@@ -492,7 +492,7 @@ def geometry_dot(t, y):
492492
burn_area = 2 * np.pi * (grain_inner_radius * grain_height)
493493

494494
grain_inner_radius_derivative = -volume_diff / burn_area
495-
grain_height_derivative = 0
495+
grain_height_derivative = 0 # Set to zero to disable axial burning
496496

497497
else:
498498
burn_area = (
@@ -528,6 +528,7 @@ def geometry_jacobian(t, y):
528528
inner_radius_derivative_wrt_height = 0
529529
height_derivative_wrt_inner_radius = 0
530530
height_derivative_wrt_height = 0
531+
# Height is a constant, so all the derivatives with respect to it are set to zero
531532

532533
return [
533534
[

0 commit comments

Comments
 (0)