Skip to content

Commit 60924a5

Browse files
CopilotMateusStano
andcommitted
BUG: Fix incorrect Jacobian in only_radial_burn branch of evaluate_geometry
Co-authored-by: MateusStano <69485049+MateusStano@users.noreply.github.com>
1 parent 745ccc8 commit 60924a5

2 files changed

Lines changed: 7 additions & 5 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ Attention: The newest changes should be on top -->
4040

4141
### Fixed
4242

43+
- BUG: Fix incorrect Jacobian in `only_radial_burn` branch of `SolidMotor.evaluate_geometry` [#935](https://github.com/RocketPy-Team/RocketPy/pull/935)
4344
- BUG: Add explicit timeouts to ThrustCurve API requests [#935](https://github.com/RocketPy-Team/RocketPy/pull/935)
4445

4546
## [v1.12.0] - 2026-03-08

rocketpy/motors/solid_motor.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -546,13 +546,14 @@ def geometry_jacobian(t, y):
546546
2 * np.pi * (grain_inner_radius * grain_height) ** 2
547547
)
548548

549-
inner_radius_derivative_wrt_inner_radius = factor * (
550-
grain_height - 2 * grain_inner_radius
551-
)
552-
inner_radius_derivative_wrt_height = 0
549+
# burn_area = 2π*r*h, so ṙ = -vdiff/(2π*r*h):
550+
# ∂ṙ/∂r = vdiff/(2π*r²*h) = factor * h
551+
# ∂ṙ/∂h = vdiff/(2π*r*h²) = factor * r
552+
inner_radius_derivative_wrt_inner_radius = factor * grain_height
553+
inner_radius_derivative_wrt_height = factor * grain_inner_radius
554+
# dh/dt = 0, so all partial derivatives of height are zero
553555
height_derivative_wrt_inner_radius = 0
554556
height_derivative_wrt_height = 0
555-
# Height is a constant, so all the derivatives with respect to it are set to zero
556557

557558
return [
558559
[

0 commit comments

Comments
 (0)